lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomás Fernández Löbbe (JIRA) <>
Subject [jira] [Commented] (SOLR-2580) Create a new Search Component to alter queries based on business rules.
Date Thu, 09 Jun 2011 12:58:59 GMT


Tomás Fernández Löbbe commented on SOLR-2580:

Basically, it's just another component designed to modify the relevancy of documents, as the
QueryElevationComponent is. Of course, this could be implemented by each site on the application
layer but I think it would be very helpful to write one reusable component, then everybody
can use the same, they don't reinvent the wheel and they can invest the effort in improving
Should it be included in Solr? Personally I think this is something that can be useful to
many people and it will add value to Solr. At the end, the community and the committers will
decide if they think this is something worthily or not.

JBoss AS is the application server, but JBoss is also an organization that runs many projects
(like drools). You don't need to use any application server in particular to make Drools work.
It's a library, not an application itself.

> Create a new Search Component to alter queries based on business rules. 
> ------------------------------------------------------------------------
>                 Key: SOLR-2580
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Tomás Fernández Löbbe
> The goal is to be able to adjust the relevance of documents based on user defined business
> 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:
> 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.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message