Hello,
[Rob Outar]
> Sorry for this question if I missed it in a FAQ or something, 
> but I am a little confused on what field I should use. I need to search 
> on all the fields I specify for the document and they should not be
tokenized --
> whatever I store as the value should stay in the same form.  
> I am thinking I should be using:
> 
> static Field UnIndexed(String name, String value)
>           Constructs a String-valued Field that is not tokenized nor
> indexed, but is stored in the index, for return with hits.
> 
> for my fields?
No, you can't use this, because this field will be not indexed. That means, 
you can't search for it. Try out:
  Field.Keyword(String name, String value) 
or the public constructor:
  Field(String name, String value, boolean store, boolean index, boolean
token)
Example:
  Field f = new Field("your-field", "your value", store, true, false); ...
Set store=false, if you don't need this field to be returned in your search
result.
Else take Field.Keyword(), which is equal to store=true.

Beware that the query parser uses an analyzer to create the query term and
all terms 
will be normalized by most analyzers. So make sure, that your analyzer
doesn't change 
your terms for fields like "your-field" to lowercase or something like that.
Regards,
        Wolf-Dietrich


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

Reply via email to