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 sharnel pereira <sh...@gmail.com> on 2011/11/08 22:19:18 UTC

query within search results

Hi,

I have 10k records indexed using solr 1.4

We have a requirement to search within search results.

example: query for 'water' returns 2000 results. I need the second query
for 'diseases' to search within those 2000 results.(I cant add a facet as
the second search should also check non faceted fields)

Is there a way to get this working.

Thanks
Sharnel

Re: query within search results

Posted by sharnel pereira <sh...@gmail.com>.
both work fine. Thanks.

On Tue, Nov 8, 2011 at 4:44 PM, Erick Erickson <er...@gmail.com>wrote:

> Why can't you add a filter query that is the original query? You can add an
> arbitrary number of fq clauses, so you could build this up as long as
> you want.
>
> Best
> Erick
>
> 2011/11/8 François Schiettecatte <fs...@gmail.com>:
> > Wouldn't 'diseases AND water' or '+diseases +water' return you that
> result? Or you could search on 'water' while filtering on 'diseases'.
> >
> > Or am I missing something here?
> >
> > François
> >
> > On Nov 8, 2011, at 4:19 PM, sharnel pereira wrote:
> >
> >> Hi,
> >>
> >> I have 10k records indexed using solr 1.4
> >>
> >> We have a requirement to search within search results.
> >>
> >> example: query for 'water' returns 2000 results. I need the second query
> >> for 'diseases' to search within those 2000 results.(I cant add a facet
> as
> >> the second search should also check non faceted fields)
> >>
> >> Is there a way to get this working.
> >>
> >> Thanks
> >> Sharnel
> >
> >
>

Re: query within search results

Posted by Erick Erickson <er...@gmail.com>.
Why can't you add a filter query that is the original query? You can add an
arbitrary number of fq clauses, so you could build this up as long as
you want.

Best
Erick

2011/11/8 François Schiettecatte <fs...@gmail.com>:
> Wouldn't 'diseases AND water' or '+diseases +water' return you that result? Or you could search on 'water' while filtering on 'diseases'.
>
> Or am I missing something here?
>
> François
>
> On Nov 8, 2011, at 4:19 PM, sharnel pereira wrote:
>
>> Hi,
>>
>> I have 10k records indexed using solr 1.4
>>
>> We have a requirement to search within search results.
>>
>> example: query for 'water' returns 2000 results. I need the second query
>> for 'diseases' to search within those 2000 results.(I cant add a facet as
>> the second search should also check non faceted fields)
>>
>> Is there a way to get this working.
>>
>> Thanks
>> Sharnel
>
>

Re: query within search results

Posted by François Schiettecatte <fs...@gmail.com>.
Wouldn't 'diseases AND water' or '+diseases +water' return you that result? Or you could search on 'water' while filtering on 'diseases'.

Or am I missing something here?

François

On Nov 8, 2011, at 4:19 PM, sharnel pereira wrote:

> Hi,
> 
> I have 10k records indexed using solr 1.4
> 
> We have a requirement to search within search results.
> 
> example: query for 'water' returns 2000 results. I need the second query
> for 'diseases' to search within those 2000 results.(I cant add a facet as
> the second search should also check non faceted fields)
> 
> Is there a way to get this working.
> 
> Thanks
> Sharnel