You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by sp...@gmx.eu on 2009/02/16 13:00:37 UTC

FieldSelector

Hi,

what kind of fields loads IndexSearcher.Document doc(int i)? Only those with
Field.Store.YES?
I'm asking because I do not need to load the tokens - should I use a
FieldSelector or are these fields not loaded?

Thank you


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


Re: FieldSelector

Posted by Grant Ingersoll <gs...@apache.org>.
On Feb 16, 2009, at 7:00 AM, <sp...@gmx.eu> <sp...@gmx.eu> wrote:

> Hi,
>
> what kind of fields loads IndexSearcher.Document doc(int i)? Only  
> those with
> Field.Store.YES?

Yes, Lucene can only load those fields that are stored.

>
> I'm asking because I do not need to load the tokens - should I use a
> FieldSelector or are these fields not loaded?

FieldSelector is used to selectively load fields that you want  
returned with the document.   The tokens produced by analysis are  
stored in other places and will not be returned by the document()  
method.



--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


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


Re: FieldSelector

Posted by Erick Erickson <er...@gmail.com>.
Depending upon the structure of your index, FieldSelector can
make a dramatic difference in your query speed. I wrote up
some data peculiar to my setup, I think if you search FieldSelector
on the Wiki you can find it.

Best
Erick

On Mon, Feb 16, 2009 at 7:00 AM, <sp...@gmx.eu> wrote:

> Hi,
>
> what kind of fields loads IndexSearcher.Document doc(int i)? Only those
> with
> Field.Store.YES?
> I'm asking because I do not need to load the tokens - should I use a
> FieldSelector or are these fields not loaded?
>
> Thank you
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>