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 Simone Tripodi <si...@apache.org> on 2011/10/25 12:21:29 UTC

Queries suggestion (not the suggester :P)

Hi all guys,
I'm working on a search service that uses solr as search engine and
the results are provided in the Atom form, containing some OpenSearch
tags.

What I'm interested to understand is if it is possible, via solr,
having in the response some suggestions to other queries in order to
enrich our opensearch info, i.e. a user submits `General Motors annual
report` and solr answers the results with information to form a
`General Motors annual report 2005` subset or a `General Motors`
superset, so the replu can be transformed to:

   <opensearch:Query role="request" searchTerms="General Motors annual
report" />
   <opensearch:Query role="subset" searchTerms="General Motors annual
report 2005"
   <opensearch:Query role="superset" searchTerms="General Motors" />

So my question is: is this possible? And if yes... how? :)

Many thanks in advance, every suggestion would be really appreciated!
Have a nice day, all the best,
Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/

Re: Queries suggestion (not the suggester :P)

Posted by Erick Erickson <er...@gmail.com>.
I've seen something like this done with an index of queries. That is, you
index actual user queries in some new core where each "document" is
a query. Then you issue the terms of the new query against this index
and get back similar "documents" (that are really queries). You'll want
to take some care about what is actually indexed, but that's "an
exercise for the reader".

You might wind up using edismax as your request handler in order to
use some of the tuning parameters for how tight/loose you want your
responses to be or maybe just ORing the terms together and counting
on the ranking will be OK.

Best
Erick

On Tue, Oct 25, 2011 at 6:21 AM, Simone Tripodi
<si...@apache.org> wrote:
> Hi all guys,
> I'm working on a search service that uses solr as search engine and
> the results are provided in the Atom form, containing some OpenSearch
> tags.
>
> What I'm interested to understand is if it is possible, via solr,
> having in the response some suggestions to other queries in order to
> enrich our opensearch info, i.e. a user submits `General Motors annual
> report` and solr answers the results with information to form a
> `General Motors annual report 2005` subset or a `General Motors`
> superset, so the replu can be transformed to:
>
>   <opensearch:Query role="request" searchTerms="General Motors annual
> report" />
>    <opensearch:Query role="subset" searchTerms="General Motors annual
> report 2005"
>    <opensearch:Query role="superset" searchTerms="General Motors" />
>
> So my question is: is this possible? And if yes... how? :)
>
> Many thanks in advance, every suggestion would be really appreciated!
> Have a nice day, all the best,
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>