Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Using NumericField

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


siraj at jobdiva

Oct 20, 2009, 8:47 AM

Post #1 of 2 (562 views)
Permalink
Using NumericField

We have an index with a number field indexed as String field. We do
range searches as well as sorting on this field. Now we want to take
advantage of the NumericField. The question is, will I have to re-index
all the documents or just adding a new document with NumericField will
be enough to convert the field type? If a re-index is needed, is there
a way to re-index just one field in a document instead of re-indexing
the whole document?

thanks



This electronic mail message and any attachments may contain information which is privileged, sensitive and/or otherwise exempt from disclosure under applicable law. The information is intended only for the use of the individual or entity named as the addressee above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution (electronic or otherwise) or forwarding of, or the taking of any action in reliance on, the contents of this transmission is strictly prohibited. If you have received this electronic transmission in error, please notify us by telephone, facsimile, or e-mail as noted above to arrange for the return of any electronic mail or attachments. Thank You.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


uwe at thetaphi

Oct 20, 2009, 8:56 AM

Post #2 of 2 (510 views)
Permalink
RE: Using NumericField [In reply to]

You have to reindex everything, the field cannot be converted. Updating
single fields is not possible (maybe in future, see wiki).

If you use the field cache (sorting against numeric fields) it is very
important to not have any legacy terms in the index, so the best is to start
with an empty index. If you do not sort, NumericRangeQuery will simply not
hit any documents using another encoding.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe [at] thetaphi

> -----Original Message-----
> From: Siraj Haider [mailto:siraj [at] jobdiva]
> Sent: Tuesday, October 20, 2009 5:47 PM
> To: java-user [at] lucene
> Subject: Using NumericField
>
> We have an index with a number field indexed as String field. We do
> range searches as well as sorting on this field. Now we want to take
> advantage of the NumericField. The question is, will I have to re-index
> all the documents or just adding a new document with NumericField will
> be enough to convert the field type? If a re-index is needed, is there
> a way to re-index just one field in a document instead of re-indexing
> the whole document?
>
> thanks
>
>
>
> This electronic mail message and any attachments may contain information
> which is privileged, sensitive and/or otherwise exempt from disclosure
> under applicable law. The information is intended only for the use of the
> individual or entity named as the addressee above. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution (electronic or otherwise) or forwarding of, or the taking of
> any action in reliance on, the contents of this transmission is strictly
> prohibited. If you have received this electronic transmission in error,
> please notify us by telephone, facsimile, or e-mail as noted above to
> arrange for the return of any electronic mail or attachments. Thank You.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.