lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From petite_abeille <>
Subject Re: indexing size
Date Wed, 01 Sep 2004 07:44:10 GMT
Hi Niraj,

On Sep 01, 2004, at 06:45, Niraj Alok wrote:

> If I make some of them Field.Unstored, I can see from the javadocs  
> that it
> will be indexed and tokenized but not stored. If it is not stored, how  
> can I
> use it while searching?

The different type of fields don't impact how you do your search. This  
is always the same.

Using Unstored fields simply means that you use Lucene as a pure index  
for search purpose only, not for storing any data.

Specifically, the assumption is that your original data lives somewhere  
else, outside of Lucene. If this assumption is true, then you can index  
everything as Unstored with the addition of one Keyword per document.  
The Keyword field holds some sort of unique identifier which allows you  
to retrieve the original data if necessary (e.g. a primary key, an URI,  
what not).

Here is an example of this approach:

(1) For indexing, check the indexValuesWithID() method

Note the addition of a Field.Keyword for each document and the use of  
Field.UnStored for everything else

(2) For fetching, check objectsWithSpecificationAndHitsInStore()




To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message