You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Rosenthal (JIRA)" <ji...@apache.org> on 2011/06/08 23:08:01 UTC

[jira] [Commented] (SOLR-2580) Create a new Search Component to alter queries based on business rules.

    [ https://issues.apache.org/jira/browse/SOLR-2580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046222#comment-13046222 ] 

Simon Rosenthal commented on SOLR-2580:
---------------------------------------

Tomas:l
I'm not sure why you would want to encapsulate these kind of rules within Solr - an e-commerce site would always have an application layer between the UI and Solr which seems like the logical place to  apply business rules leading to modifying the request by adding boosts, specifying sort order, etc. 

Also, is Drools separate from JBoss (which is used relatively in frequently in the Solr community) ?


> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: [jira] [Commented] (SOLR-2580) Create a new Search Component to alter queries based on business rules.

Posted by Muhannad <mu...@gmail.com>.
Actually I applied business rules using dismax , using a layer to rewrite
the query so that it meets user specific preferences ,so search results for
a user not the same for another user  and we can boost queries based on
different fields and for specific values same as elevate !!

On Thu, Jun 9, 2011 at 12:08 AM, Simon Rosenthal (JIRA) <ji...@apache.org>wrote:

>
>    [
> https://issues.apache.org/jira/browse/SOLR-2580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046222#comment-13046222]
>
> Simon Rosenthal commented on SOLR-2580:
> ---------------------------------------
>
> Tomas:l
> I'm not sure why you would want to encapsulate these kind of rules within
> Solr - an e-commerce site would always have an application layer between the
> UI and Solr which seems like the logical place to  apply business rules
> leading to modifying the request by adding boosts, specifying sort order,
> etc.
>
> Also, is Drools separate from JBoss (which is used relatively in frequently
> in the Solr community) ?
>
>
> > 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
> >
> > 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.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>


-- 
*Eng.Muhannad al Hariri *
*
*
*Software Developer*
*email : muh.acit@gmail.com*
*twitter : @muh_acit <http://twitter.com/muh_acit>*
*Skype : muh.hari*
*phone : *
*      Jordan +962 78 677 5125*
*
*
*حاسبونا فدققوا ثمّ منّوا فأعتقوا ..هكذا شيمة الملوك بالمماليك يرفقوا*
*
*