Description
The goal is to be able to adjust the relevance of documents based on user defined business rules.
For example, in a e-commerce site, when the user chooses the "shoes" category, we may be interested in boosting products from a certain brand. This can be expressed as a rule in the following way:
rule "Boost Adidas products when searching shoes"
when
$qt : QueryTool()
TermQuery(term.field=="category", term.text=="shoes")
then
$qt.boost("
end
The QueryTool object should be used to alter the main query in a easy way. Even more human-like rules can be written:
rule "Boost Adidas products when searching shoes"
when
Query has term "shoes" in field "product"
then
Add boost query "{!lucene}
brand:adidas"
end
These rules are written in a text file in the config directory and can be modified at runtime. Rules will be managed using JBoss Drools: http://www.jboss.org/drools/drools-expert.html
On a first stage, it will allow to add boost queries or change sorting fields based on the user query, but it could be extended to allow more options.
Attachments
Issue Links
- is related to
-
SOLR-1520 QueryElevationComponent does not work when unique key is of type 'sint'
- Closed
-
SOLR-1730 Solr fails to start if QueryElevationComponent config is missing
- Closed
-
SOLR-2951 Augment QueryElevationComponent results
- Resolved
-
SOLR-2949 QueryElevationComponent does not fully support distributed search
- Closed
-
SOLR-2950 QueryElevationComponent needlessly looks up document ids
- Closed
- relates to
-
SOLR-2965 Support Landing Pages/Redirects
- Resolved