lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Storing numbers
Date Fri, 05 Mar 2004 14:42:52 GMT
Either store it as a Keyword Field, which does not get Analyzed, or use
that per-field Analyzer wrapper class.
Your problem is most likely that you are using something like
StandardAnalyzer that, I believe, throws out numbers from its input
before indexing (i.e. your numbers are not getting indexed in the first
place).  Try with Field.Keyword.

Otis

--- lucene@nitwit.de wrote:
> Hi!
> 
> I want to store numbers (id) in my index:
> 
> 	long id = 1069421083284;
> 	doc.add(Field.UnStored("in", String.valueOf(id)));	
> 
> But searching for "id:1069421083284" doesn't return any hits.
> 
> Well, did I misunderstand something? UnStored is the number is stored
> but not 
> index (analyzed), isn't it? Anyway, Field.Text doesn't work either.
> 
> TIA
> Timo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


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


Mime
View raw message