[
https://issues.apache.org/jira/browse/SOLR-2580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163758#comment-13163758
]
Grant Ingersoll commented on SOLR-2580:
---------------------------------------
I'm going to start work on this, but would like to take it a bit beyond just
Drools. As I see it, there are a number of requirements necessary to have a
successful rules component:
# Boosting/reranking:
## search results
## facets
## Suggestions (spellchecking, related searches, etc. once these get added)
# Rules for adding/removing filters
# Modify fields (via the transformers in Solr) as they come out -- for
instance, alter the price field
# (Optional) Modify documents to be indexed by rules -- lower priority
I think Drools would make for a nice first implementation, but I also see that
we the QueryElevationComponent (or a modified version of it) is a simple form
of some of these things, so the idea would be to make a thin layer in between
to make the engines pluggable.
> Create a new Search Component to alter queries based on business rules.
> ------------------------------------------------------------------------
>
> Key: SOLR-2580
> URL: https://issues.apache.org/jira/browse/SOLR-2580
> Project: Solr
> Issue Type: New Feature
> Reporter: Tomás Fernández Löbbe
> Assignee: Grant Ingersoll
>
> 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("{!lucene}brand:adidas");
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]