Umer
Umer

Reputation: 1921

Lucene Boolean value search with boolean query

There is a field say XYZ with value as either TRUE or FALSE. i am searching as following

+Contents:risk +XYZ:TRUE

is it legal to search like that? i tried but it showed me results with FALSE value too.

What was more amazing is that i searched by +XYZ:[TRUE TO TRUE] and it worked.

can some one tell me what exactly is my mistake?

Upvotes: 2

Views: 3871

Answers (1)

Xodarap
Xodarap

Reputation: 11859

it's perfectly fine to search like that. Did you ensure that your analyzers are correct?

Upvotes: 2

Related Questions