lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luc...@nitwit.de
Subject Re: Storing numbers
Date Fri, 05 Mar 2004 13:51:59 GMT
On Friday 05 March 2004 12:27, Morus Walter wrote:
> > 	doc.add(Field.UnStored("in", String.valueOf(id)));
> >
> > But searching for "id:1069421083284" doesn't return any hits.
>
> If your field is named 'in' you shouldn't search in 'id'. Right?
>
> Well, indexing and analyzing are different things.
> UnStored means, the number is not stored (as the name says) but indexed.
> And IIRC it's analyzed before indexing. Shouldn't make a difference for
> a single number.
>
> What I'd use in this case is an unstored keyword (given that you really
> don't want to have the id returned from lucene, which is the consequence of
> not storing).

Sorry, typo :-)

I do have severeal docs in index and each doc does have an id. And I just want 
to find a particular doc by its id. 

	doc.add(Field.UnIndexed("id", String.valueOf(id)));

doesn't work either. And as I mentioned not even Field.Text does work....

---------------------------------------------------------------------
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