On 08.03.2011 14:11, Christian Setzkorn wrote:
Hi,



I have a class that contains a Boolean value:



[Field(Index.UnTokenized, Store = Store.No)]

public virtual bool P { get; set; }

What is the query syntax to find objects where P = True? I tried any
imaginable combination with no avail.


It depends on how your software (looks like it's based on
NHibernate) is mapping class fields to Lucene field names
and how values are stored.

Usually, finding something as simple as an untokenized
field evolves around creating a simple TermQuery for
a given field name and the value to be searched for:

new TermQuery(new Term("your field name", "some value"));

Robert

Reply via email to