Re: about isStored method

2013-01-26 Thread Lin Ma
Thanks Uwe,

The information you provided is very informative. Two more
questions/comments,

   - For stored field, it means its original information/structure is kept
   for search results (I think for an indexed field it means means lost its
   original form to indexed form), correct?
   - What means phonetic fields, phonetic serach and phonetic filter?
   Appreciate if you could show an example?

regards,
Lin

On Sat, Jan 26, 2013 at 2:16 PM, Uwe Schindler u...@thetaphi.de wrote:

 Because you can search on it? The stored fields are only those that should
 be displayed to the user with search results. Imagine e.g. Google: Google
 displays in its search results the title of the document and some
 description, but it does not display the whole document text. So in their
 case, they would store the title and some description of every document.
 On the other hand you can search on the whole document, so the whole
 document text, which could be megabytes of text data (like books), is
 indexed.  Other cases where you have indexed-only field that are not
 stored are:
 - phonetic fields: Often, some fields are indexed a second time as a
 duplicate, but with a phonetic filter assigned (that converts all tokens to
 phonetic representations). You can then do a phonetic serach in addition to
 the exact matching search, but it makes absolutely no sense to store the
 field 2 times.
 - fields only used for faceting or sorting
 - ...and many more

 stored fields are for display to the user, indexed fields are for
 retrieval. They have nothing to do with each other.

 Uwe

 -
 Uwe Schindler
 H.-H.-Meier-Allee 63, D-28213 Bremen
 http://www.thetaphi.de
 eMail: u...@thetaphi.de


  -Original Message-
  From: Lin Ma [mailto:lin...@gmail.com]
  Sent: Saturday, January 26, 2013 6:01 AM
  To: java-user@lucene.apache.org; ian@gmail.com
  Subject: Re: about isStored method
 
  Thanks Ian,
 
  If the value is not stored in index, it cannot be retrieved on search
 results?
  My confusion is, if a field will not be in search result (isStored ==
 false), why
  we need such field in Document?
 
  regards,
  Lin
 
  On Sat, Jan 26, 2013 at 4:37 AM, Ian Lea ian@gmail.com wrote:
 
   If you're new to lucene why are you using such an old version?  Stored
   means the value is stored in the index and can be retrieved later e.g.
   for displaying on a search results page. Not stored means it isn't and
   can't be.
  
   There was a similar question not long ago on this list - check the
   archives.
  
   And read Lucene In Action.
  
  
   --
   Ian.
  
  
   On Fri, Jan 25, 2013 at 4:58 PM, Lin Ma lin...@gmail.com wrote:
Hi guys,
   
I am new to Lucene and for isStored method for interface Fieldable (
   
  
  http://lucene.apache.org/core/old_versioned_docs/versions/3_0_3/api/co
   re/index.html
   ),
what are the logical meanings for stored and not stored? It is
appreciate if anyone could show me an example. I searched many
tutorials but not
   found
description for what means stored and what means not stored.
   
thanks in advance,
Lin
  
   -
   To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
   For additional commands, e-mail: java-user-h...@lucene.apache.org
  
  


 -
 To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
 For additional commands, e-mail: java-user-h...@lucene.apache.org




Re: about isStored method

2013-01-26 Thread Andrew Gilmartin
I seems that you would benefit from reading at least one of the great 
books on Lucene. Lucene in Action is a good place to start. Until the, 
perhaps the following will be helpful


Lin Ma wrote:


- For stored field, it means its original information/structure is kept
for search results (I think for an indexed field it means means lost its
original form to indexed form), correct?


A document can have one or more fields. A field has a name and a value.

A field's value can be both stored and analyzed.

A field's value that is ONLY stored may not be used in a search query. 
It may only be used as a place to hold data about the document found. A 
document can have any number of stored fields.


A field's value that is ONLY analyzed can be used in a search query. It 
is of no use other than for searching. A document can have nay number of 
analyzed fields.


A field's value that is stored + analyzed may be used in a search query 
and it's value may be retrieved from the document. A document can have 
any number of stored + analyzed fields.


It must be noted that a field's value is often not useful for both 
analyzing and utility after the search. In my experience the only common 
reason to have a field both stored + analyzed is that during development 
having the filed's value available for debugging greatly aids 
discovering root problems.



- What means phonetic fields, phonetic serach and phonetic filter?
Appreciate if you could show an example?


I don't any experience with this side Lucene. When Google fails to find 
something relevant try a Delicious search. For example,


https://delicious.com/search?p=lucene%2Cphonetic

Good luck.

-- Andrew

--
Andrew Gilmartin
and...@andrewgilmartin.com
401-441-2062


-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



how to avoid OutOfMemoryError while indexing ?

2013-01-26 Thread wgggfiy
I found it is very easy to come into OutOfMemoryError.
My idea is that lucene could set the RAM memory Automatically,
but I couldn't find the API. My code: 

IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_40, analyzer);
int mb = 1024 * 1024;
double ram = Runtime.getRuntime().maxMemory() / mb;
iwc.setRAMBufferSizeMB(ram);

but still OutOfMemoryError, can anyone help me ? thx



-
--
Email: wuqiu.m...@qq.com
--
--
View this message in context: 
http://lucene.472066.n3.nabble.com/how-to-avoid-OutOfMemoryError-while-indexing-tp4036484.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org