Hi, considerations like that one are applied automatically, although the Lucene engine is going to be much smarter than your example as it will also consider how each term is actually relevant compared to the full set of terms in your index.
If you really want it to just use 1,5f and 2.0f exactly, then you should customize the Similarity implementation: http://docs.jboss.org/hibernate/search/5.0/reference/en-US/html_single/#_customizing_lucene_s_scoring_formula
But before doing that, I would suggest to experiment with a full text query on your specific example using a projection on the EXPLANATION: it will print exactly which formula and which scores it will use for "India" vs "Indiana" vs "Indiana Town", etc..
See: FullTextQuery.EXPLANATION in http://docs.jboss.org/hibernate/search/5.0/reference/en-US/html_single/#projections
_________________ Sanne http://in.relation.to/
|