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 Brendan Grainger <br...@gmail.com> on 2013/06/14 01:43:03 UTC
Suggest and Filtering
Hi Solr Guru's
I am trying to implement auto suggest where solr would suggest several
phrases that would return results as the user types in a query (as distinct
from autocomplete). e.g. say the user starts typing 'br' and we have
documents that contain "brake pads" and "left disc brake", solr would
suggest both of those phrases with "brake pads" first. I also want to only
look at documents that match a given filter query. So say I have a bunch of
documents for a toyota cressida that contain the bi-gram "brake pads",
while the documents for a honda accord don't have any brake pad articles.
If the user is filtering on the honda accord I wouldn't want "brake pads"
as a suggestion.
Right now, I've played with the suggest component and using faceting.
Any thoughts?
Thanks
Brendan
--
Brendan Grainger
www.kuripai.com
Re: ngroups does not show correct number of groups when used in SolrCloud
Posted by "Markus.Mirsberger" <ma...@gmx.de>.
Hi Shreejay,
Thanks for the info.
I read about this too but as far as I understand this this feature is
not really usefull in my case.
This means I would have to reindex my documents just to get the grouping
that I need now.
It would be OK to do that one time but I would have to do that again
when I maybe want to group on another field too in a few weeks.
Thanks,
Markus
On 14.06.2013 20:28, Shreejay wrote:
> Hi Markus,
>
> For ngroups to work in a cloud environment you have to make sure that all docs belonging to a group reside on the same shard. Custom hashing has been introduced in the recent versions of solr cloud. You might want to look into that
> https://issues.apache.org/jira/browse/SOLR-2592
>
> All queries on SolrCloud are run individually on each shard. And then the results are merged. When u run a group query SolrCloud runs the query on each shard and when the results are merged the ngroups from each shard are added up. This is why the ngroups is incorrect when using SolrCloud.
>
Re: ngroups does not show correct number of groups when used in
SolrCloud
Posted by Shreejay <sh...@gmail.com>.
Hi Markus,
For ngroups to work in a cloud environment you have to make sure that all docs belonging to a group reside on the same shard. Custom hashing has been introduced in the recent versions of solr cloud. You might want to look into that
https://issues.apache.org/jira/browse/SOLR-2592
All queries on SolrCloud are run individually on each shard. And then the results are merged. When u run a group query SolrCloud runs the query on each shard and when the results are merged the ngroups from each shard are added up. This is why the ngroups is incorrect when using SolrCloud.
--
Shreejay
On Friday, June 14, 2013 at 5:11, Markus.Mirsberger wrote:
> Hi,
>
> I just noticed (after long time testing and finally looking into the
> docu :p) that the ngroups parameter does not show the correct number of
> groups when used in anything else than a single shard environment (in my
> case SolrCloud).
>
> Is there another way to get the amount of all groups without iterating
> through alot of resultsets?
> I dont need the values of the grouping. I just need the complete number
> of groups.
>
> Or can this be done with facets maybe?
> I dont need to to use grouping but as far as I know I cant get the
> complete amount of facets without iterating through the resultsets.
> So this seemed to me the only way to achieve something equal to a
> distinct count in sql.
>
> any ideas how this can be done with solr?
>
>
> Thanks,
> Markus
>
>
ngroups does not show correct number of groups when used in SolrCloud
Posted by "Markus.Mirsberger" <ma...@gmx.de>.
Hi,
I just noticed (after long time testing and finally looking into the
docu :p) that the ngroups parameter does not show the correct number of
groups when used in anything else than a single shard environment (in my
case SolrCloud).
Is there another way to get the amount of all groups without iterating
through alot of resultsets?
I dont need the values of the grouping. I just need the complete number
of groups.
Or can this be done with facets maybe?
I dont need to to use grouping but as far as I know I cant get the
complete amount of facets without iterating through the resultsets.
So this seemed to me the only way to achieve something equal to a
distinct count in sql.
any ideas how this can be done with solr?
Thanks,
Markus
Re: Suggest and Filtering
Posted by Brendan Grainger <br...@gmail.com>.
Hi Otis and Jorge,
I probably wasn't phrasing my question too well, but I think I was looking
for FuzzySuggest. Messing around with the configs found here seems to be
doing what I want:
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig-phrasesuggest.xml
Thanks
Brendan
On Fri, Jun 14, 2013 at 11:50 AM, Brendan Grainger <
brendan.grainger@gmail.com> wrote:
> Hi Otis,
>
> Sorry was a bit tired when I wrote that. I think what I'd like is to be
> able spellcheck the suggestions. For example. If a user types in brayk (as
> opposed to brake) I'd still get the following suggestions say:
>
> brake line
> brake condition
>
> Does that make sense?
>
> Thanks
> Brendan
>
>
>
> On Thu, Jun 13, 2013 at 8:53 PM, Otis Gospodnetic <
> otis.gospodnetic@gmail.com> wrote:
>
>> Hi,
>>
>> I think you are talking about wanting instant search?
>>
>> See https://github.com/fergiemcdowall/solrstrap
>>
>> Otis
>> --
>> Solr & ElasticSearch Support
>> http://sematext.com/
>>
>>
>>
>>
>>
>> On Thu, Jun 13, 2013 at 7:43 PM, Brendan Grainger
>> <br...@gmail.com> wrote:
>> > Hi Solr Guru's
>> >
>> > I am trying to implement auto suggest where solr would suggest several
>> > phrases that would return results as the user types in a query (as
>> distinct
>> > from autocomplete). e.g. say the user starts typing 'br' and we have
>> > documents that contain "brake pads" and "left disc brake", solr would
>> > suggest both of those phrases with "brake pads" first. I also want to
>> only
>> > look at documents that match a given filter query. So say I have a
>> bunch of
>> > documents for a toyota cressida that contain the bi-gram "brake pads",
>> > while the documents for a honda accord don't have any brake pad
>> articles.
>> > If the user is filtering on the honda accord I wouldn't want "brake
>> pads"
>> > as a suggestion.
>> >
>> > Right now, I've played with the suggest component and using faceting.
>> >
>> > Any thoughts?
>> >
>> > Thanks
>> > Brendan
>> >
>> > --
>> > Brendan Grainger
>> > www.kuripai.com
>>
>
>
>
> --
> Brendan Grainger
> www.kuripai.com
>
--
Brendan Grainger
www.kuripai.com
Re: Suggest and Filtering
Posted by Brendan Grainger <br...@gmail.com>.
Hi Otis,
Sorry was a bit tired when I wrote that. I think what I'd like is to be
able spellcheck the suggestions. For example. If a user types in brayk (as
opposed to brake) I'd still get the following suggestions say:
brake line
brake condition
Does that make sense?
Thanks
Brendan
On Thu, Jun 13, 2013 at 8:53 PM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:
> Hi,
>
> I think you are talking about wanting instant search?
>
> See https://github.com/fergiemcdowall/solrstrap
>
> Otis
> --
> Solr & ElasticSearch Support
> http://sematext.com/
>
>
>
>
>
> On Thu, Jun 13, 2013 at 7:43 PM, Brendan Grainger
> <br...@gmail.com> wrote:
> > Hi Solr Guru's
> >
> > I am trying to implement auto suggest where solr would suggest several
> > phrases that would return results as the user types in a query (as
> distinct
> > from autocomplete). e.g. say the user starts typing 'br' and we have
> > documents that contain "brake pads" and "left disc brake", solr would
> > suggest both of those phrases with "brake pads" first. I also want to
> only
> > look at documents that match a given filter query. So say I have a bunch
> of
> > documents for a toyota cressida that contain the bi-gram "brake pads",
> > while the documents for a honda accord don't have any brake pad articles.
> > If the user is filtering on the honda accord I wouldn't want "brake pads"
> > as a suggestion.
> >
> > Right now, I've played with the suggest component and using faceting.
> >
> > Any thoughts?
> >
> > Thanks
> > Brendan
> >
> > --
> > Brendan Grainger
> > www.kuripai.com
>
--
Brendan Grainger
www.kuripai.com
Re: Suggest and Filtering
Posted by Otis Gospodnetic <ot...@gmail.com>.
Hi,
I think you are talking about wanting instant search?
See https://github.com/fergiemcdowall/solrstrap
Otis
--
Solr & ElasticSearch Support
http://sematext.com/
On Thu, Jun 13, 2013 at 7:43 PM, Brendan Grainger
<br...@gmail.com> wrote:
> Hi Solr Guru's
>
> I am trying to implement auto suggest where solr would suggest several
> phrases that would return results as the user types in a query (as distinct
> from autocomplete). e.g. say the user starts typing 'br' and we have
> documents that contain "brake pads" and "left disc brake", solr would
> suggest both of those phrases with "brake pads" first. I also want to only
> look at documents that match a given filter query. So say I have a bunch of
> documents for a toyota cressida that contain the bi-gram "brake pads",
> while the documents for a honda accord don't have any brake pad articles.
> If the user is filtering on the honda accord I wouldn't want "brake pads"
> as a suggestion.
>
> Right now, I've played with the suggest component and using faceting.
>
> Any thoughts?
>
> Thanks
> Brendan
>
> --
> Brendan Grainger
> www.kuripai.com
Re: Suggest and Filtering
Posted by "Ing. Jorge Luis Betancourt Gonzalez" <jl...@uci.cu>.
If is query suggestion what you are looking for, what we've done is storing the user queries into a separated core and pull the suggestions from there.
----- Mensaje original -----
De: "Brendan Grainger" <br...@gmail.com>
Para: solr-user@lucene.apache.org
Enviados: Jueves, 13 de Junio 2013 19:43:03
Asunto: Suggest and Filtering
Hi Solr Guru's
I am trying to implement auto suggest where solr would suggest several
phrases that would return results as the user types in a query (as distinct
from autocomplete). e.g. say the user starts typing 'br' and we have
documents that contain "brake pads" and "left disc brake", solr would
suggest both of those phrases with "brake pads" first. I also want to only
look at documents that match a given filter query. So say I have a bunch of
documents for a toyota cressida that contain the bi-gram "brake pads",
while the documents for a honda accord don't have any brake pad articles.
If the user is filtering on the honda accord I wouldn't want "brake pads"
as a suggestion.
Right now, I've played with the suggest component and using faceting.
Any thoughts?
Thanks
Brendan
--
Brendan Grainger
www.kuripai.com
http://www.uci.cu
http://www.uci.cu