You'll need the import org.apache.lucene.search.spans package in Solr's 
ExtendedDismaxQParserPlugin and add SpanFirstQuery's to the main query. 
Something like:
query.add(new SpanFirstQuery(new SpanTermQuery(field, clause), distance), 
BooleanClause.Occur.SHOULD);

 
-----Original message-----
> From:Anatoli Matuskova <anatoli.matusk...@gmail.com>
> Sent: Thursday 18th July 2013 12:33
> To: solr-user@lucene.apache.org
> Subject: RE: boost docs if token matches happen in the first 5 words
> 
> Thanks for the quick answer Markus.
> Could you give me a a guideline or point me where to check in the solr
> source code to see how to get it done?
> 
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/boost-docs-if-token-matches-happen-in-the-first-5-words-tp4078786p4078792.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 

Reply via email to