I just ran into some unexpected results when I tried to search on a boolean value. The field was annotated like so
@Column
@Field(index=Index.YES)
public boolean isRead(){
return read;
}
Upon examination of the index I realized that the values were indexed as tru fals
in stead of true false
I never realized before that this could happen as it doesn't make any sense to analyze a boolean value string. It might have been something that changed over time. Anyway, I think it's a bug. It might even make sense to store a boolean value by default as a NumericField.
Adding Analyze.NO of course resolves the issues, but this shouldn't be necessary.
|