> Aaargh. So now i stand between sticking my head into the
> source OR writing my own engine (which is not a big deal
> becouse my requirements arent that big but it will anyway
> set me back a week or so).

There is another way, although it is not a good thing to chance source code of 
solr and re-generate solr.war. I think you can achieve what you want by 
changing only one line of SolrQueryParser.java and re-creating solr.war from 
scratch. 

Find the method 
protected Query getPrefixQuery(String field, String termStr) throws 
ParseException {...} 
in SolrQueryParser.java

There should be a line 
prefixQuery.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE);
just before the return statement. 

If you replace this line with
prefixQuery.setRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);

And re-compile whole project, your newly generated solr.war will calculate 
scores (taking account of index time boost values) for PrefixQuery (test* types 
of queries)

Please let me know if this works for you.


      

Reply via email to