Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

January 22, 2014

Build Your Own Custom Lucene Query And Scorer

Filed under: Lucene,Search Engines — Patrick Durusau @ 8:03 pm

Build Your Own Custom Lucene Query And Scorer by Doug Turnbull.

From the post:

Every now and then we’ll come across a search problem that can’t simply be solved with plain Solr relevancy. This usually means a customer knows exactly how documents should be scored. They may have little tolerance for close approximations of this scoring through Solr boosts, function queries, etc. They want a Lucene-based technology for text analysis and performant data structures, but they need to be extremely specific in how documents should be scored relative to each other.

Well for those extremely specialized cases we can prescribe a little out-patient surgery to your Solr install – building your own Lucene Query.

This Is The Nuclear Option

Before we dive in, a word of caution. Unless you just want the educational experience, building a custom Lucene Query should be the “nuclear option” for search relevancy. It’s very fiddly and there are many ins-and-outs. If you’re actually considering this to solve a real problem, you’ve already gone down the following paths:

Not for the faint of heart!

On the other hand, Doug’s list of options to try before writing a custom Lucene query and scorer makes a great checklist of tweaking options.

You could stop there and learn a great deal. Or you can opt to continue for what Doug calls “the educational experience.”

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress