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
--- [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]