You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Siamak Rowshan <si...@softmart.com> on 2015/09/02 22:07:06 UTC

Rules for pre-processing queries

Hi all, I need to refine my search results by adding parameters to search query parameters. For example, if user enters "ipad", I want to add a filter query such as ("category=tablets") to refine the search results. I thought a more general solution would be to define rules, that examine the query parameter values, and can alter or add to the query parameters. Short of writing custom code, are there any features within Solr or add-on tools that can do something like this?

Regards,
Mak


Siamak Rowshan | Software Engineer
Softmart | 450 Acorn Lane Downingtown, PA 19335
P   | 888-763-8627
siamak.rowshan@softmart.com

****************************************************
EEO Employer/Protected Veteran/Disabled
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. Softmart Sales Terms & Conditions available at www.softmart.com/terms.
****************************************************




RE: Rules for pre-processing queries

Posted by Siamak Rowshan <si...@softmart.com>.
Thanks Arcadius! Great and helpful article.



Siamak Rowshan | Software Engineer
Softmart | 450 Acorn Lane Downingtown, PA 19335
P   | 888-763-8627
siamak.rowshan@softmart.com

****************************************************
EEO Employer/Protected Veteran/Disabled
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. Softmart Sales Terms & Conditions available at www.softmart.com/terms.
****************************************************



-----Original Message-----
From: Arcadius Ahouansou [mailto:arcadius@menelic.com]
Sent: Wednesday, September 02, 2015 4:53 PM
To: solr-user
Subject: Re: Rules for pre-processing queries

Hello Siamak.

You may also want to have a look at 3 related articles, the 3rd part being:

http://lucidworks.com/blog/query-autofiltering-extended-language-logic-search/

I would start from the 1st part.

Hope this helps a bit.

Arcadius.

On 2 September 2015 at 21:09, Upayavira <uv...@odoko.co.uk> wrote:

> Do you have a predefined list of such filters?
>
> You can do fun things with synonyms: define an ipad->tablet synonym,
> and use it at query time. Filter out all non-synonym terms in your
> query time analysis chain, and then use that field as a filter.
>
> Upayavira
>
> On Wed, Sep 2, 2015, at 09:07 PM, Siamak Rowshan wrote:
> > Hi all, I need to refine my search results by adding parameters to
> > search query parameters. For example, if user enters "ipad", I want
> > to add a filter query such as ("category=tablets") to refine the
> > search results. I thought a more general solution would be to define
> > rules, that examine the query parameter values, and can alter or add to the query parameters.
> > Short of writing custom code, are there any features within Solr or
> > add-on tools that can do something like this?
> >
> > Regards,
> > Mak
> >
> >
> > Siamak Rowshan | Software Engineer
> > Softmart | 450 Acorn Lane Downingtown, PA 19335
> > P   | 888-763-8627
> > siamak.rowshan@softmart.com
> >
> > ****************************************************
> > EEO Employer/Protected Veteran/Disabled The information in this
> > e-mail is confidential and may be legally privileged. It is intended
> > solely for the addressee. Access to this e-mail by anyone else is
> > unauthorized. Softmart Sales Terms & Conditions available at
> > www.softmart.com/terms.
> > ****************************************************
> >
> >
> >
>



--
Arcadius Ahouansou
Menelic Ltd | Information is Power
M: 07908761999
W: www.menelic.com
---

Re: Rules for pre-processing queries

Posted by Arcadius Ahouansou <ar...@menelic.com>.
Hello Siamak.

You may also want to have a look at 3 related articles, the 3rd part being:

http://lucidworks.com/blog/query-autofiltering-extended-language-logic-search/

I would start from the 1st part.

Hope this helps a bit.

Arcadius.

On 2 September 2015 at 21:09, Upayavira <uv...@odoko.co.uk> wrote:

> Do you have a predefined list of such filters?
>
> You can do fun things with synonyms: define an ipad->tablet synonym, and
> use it at query time. Filter out all non-synonym terms in your query
> time analysis chain, and then use that field as a filter.
>
> Upayavira
>
> On Wed, Sep 2, 2015, at 09:07 PM, Siamak Rowshan wrote:
> > Hi all, I need to refine my search results by adding parameters to search
> > query parameters. For example, if user enters "ipad", I want to add a
> > filter query such as ("category=tablets") to refine the search results. I
> > thought a more general solution would be to define rules, that examine
> > the query parameter values, and can alter or add to the query parameters.
> > Short of writing custom code, are there any features within Solr or
> > add-on tools that can do something like this?
> >
> > Regards,
> > Mak
> >
> >
> > Siamak Rowshan | Software Engineer
> > Softmart | 450 Acorn Lane Downingtown, PA 19335
> > P   | 888-763-8627
> > siamak.rowshan@softmart.com
> >
> > ****************************************************
> > EEO Employer/Protected Veteran/Disabled
> > The information in this e-mail is confidential and may be legally
> > privileged. It is intended solely for the addressee. Access to this
> > e-mail by anyone else is unauthorized. Softmart Sales Terms & Conditions
> > available at www.softmart.com/terms.
> > ****************************************************
> >
> >
> >
>



-- 
Arcadius Ahouansou
Menelic Ltd | Information is Power
M: 07908761999
W: www.menelic.com
---

RE: Rules for pre-processing queries

Posted by Siamak Rowshan <si...@softmart.com>.
Upayavira, wow! Didn’t think it'd work that well, and would be so easy to do! I do have a predefined list, so synonyms work great! Thanks!



Siamak Rowshan | Software Engineer
Softmart | 450 Acorn Lane Downingtown, PA 19335
P   | 888-763-8627
siamak.rowshan@softmart.com

****************************************************
EEO Employer/Protected Veteran/Disabled
The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorized. Softmart Sales Terms & Conditions available at www.softmart.com/terms.
****************************************************



-----Original Message-----
From: Upayavira [mailto:uv@odoko.co.uk]
Sent: Wednesday, September 02, 2015 4:10 PM
To: solr-user@lucene.apache.org
Subject: Re: Rules for pre-processing queries

Do you have a predefined list of such filters?

You can do fun things with synonyms: define an ipad->tablet synonym, and use it at query time. Filter out all non-synonym terms in your query time analysis chain, and then use that field as a filter.

Upayavira

On Wed, Sep 2, 2015, at 09:07 PM, Siamak Rowshan wrote:
> Hi all, I need to refine my search results by adding parameters to
> search query parameters. For example, if user enters "ipad", I want to
> add a filter query such as ("category=tablets") to refine the search
> results. I thought a more general solution would be to define rules,
> that examine the query parameter values, and can alter or add to the query parameters.
> Short of writing custom code, are there any features within Solr or
> add-on tools that can do something like this?
>
> Regards,
> Mak
>
>
> Siamak Rowshan | Software Engineer
> Softmart | 450 Acorn Lane Downingtown, PA 19335
> P   | 888-763-8627
> siamak.rowshan@softmart.com
>
> ****************************************************
> EEO Employer/Protected Veteran/Disabled The information in this e-mail
> is confidential and may be legally privileged. It is intended solely
> for the addressee. Access to this e-mail by anyone else is
> unauthorized. Softmart Sales Terms & Conditions available at
> www.softmart.com/terms.
> ****************************************************
>
>
>

Re: Rules for pre-processing queries

Posted by Upayavira <uv...@odoko.co.uk>.
Do you have a predefined list of such filters?

You can do fun things with synonyms: define an ipad->tablet synonym, and
use it at query time. Filter out all non-synonym terms in your query
time analysis chain, and then use that field as a filter.

Upayavira

On Wed, Sep 2, 2015, at 09:07 PM, Siamak Rowshan wrote:
> Hi all, I need to refine my search results by adding parameters to search
> query parameters. For example, if user enters "ipad", I want to add a
> filter query such as ("category=tablets") to refine the search results. I
> thought a more general solution would be to define rules, that examine
> the query parameter values, and can alter or add to the query parameters.
> Short of writing custom code, are there any features within Solr or
> add-on tools that can do something like this?
> 
> Regards,
> Mak
> 
> 
> Siamak Rowshan | Software Engineer
> Softmart | 450 Acorn Lane Downingtown, PA 19335
> P   | 888-763-8627
> siamak.rowshan@softmart.com
> 
> ****************************************************
> EEO Employer/Protected Veteran/Disabled
> The information in this e-mail is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this
> e-mail by anyone else is unauthorized. Softmart Sales Terms & Conditions
> available at www.softmart.com/terms.
> ****************************************************
> 
> 
>