On Wed, Aug 26, 2015 at 09:58:39PM +0100, Sanne Grinovero wrote:
Assuming you build a Lucene Query the following way:
queryBuilder.keyword().onField( "age" ).matching( 5 ).createQuery();
What is your expectation, if the "age" field is being indexed as a
NumericField?
I would say that this throws an exception. At least atm. Numeric encoded
fields needs to be targeted by a range query. One could imagine to transparently
create a range query in this case. I guess by the metadata we could tell that we have
a numeric field. However, that's a a lot of magic then, in particular since we
always that that a keyword query maps to a TermQuery.
--Hardy