Solr/Lucene Scorer -


We are currently working on a proof of concept for a customer using Solr and to configure all the features Are able to except for scoring.

The problem is that they want the scores that fall into the bucket:

  • Bucket 1: Exact match on Category (Score = 4)
  • Bucket 4: Partial Match on Name (Score = 1)

At first we had developed a custom equality class, which would return the correct score on the grounds and on an exact or partial basis.

The only problem is that when a document matches both the category and the name, the scores are added together. Example: Search category for "restaurant" gives details of documents in the restaurant, in which there is a word restaurant on their name and thus a score of 5 (4 + 1) gets them, but only 4 get.

I think we will need to develop a custom scorer class to work for it, but we have no clue about how to include it in solar.

> There is probably a simple solution that we do not know.

All suggestions are welcome!

Scorers are part of Lucene Queries via 'Wet' query method.

In short, call the framework Query.weight (..). Scorers (..)

To use your own quad-core in Solar, you will need to implement your own solver QueryParserPlugin, which uses your own QParser, which generates your pre-applied Lucene query. You can then use it here in the specified solar:

On the implementation, this part should be as simple as it is some gluing code.

Enjoy Solar!


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -