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 Danesh Kuruppu <dk...@gmail.com> on 2015/05/21 14:49:05 UTC

Is it possible to do term Search for the filtered result set

Hi all,

Is it possible to do term search for the filtered result set. we can do
term search for all documents. Can we do the term search only for the
specified filtered result set.

Lets says we have,

Doc1 --> type: A
             tags: T1 T2

Doc2 --> type: A
             tags: T1 T3

Doc3 --> type: B
             tags: T1 T4 T5

Can we do term search for tags only in type:A documents, So that it gives
the results as
T1 - 02
T2 - 01
T3 - 01

Is this possible? If so can you please share documents on this.
Thanks
Danesh

Re: Is it possible to do term Search for the filtered result set

Posted by Danesh Kuruppu <dk...@gmail.com>.
Many Thanks Erick and Upayavira,

Solution works for me.


On Thu, May 21, 2015 at 9:10 PM, Upayavira <uv...@odoko.co.uk> wrote:

> and then facet on the tags field.
>
> &facet=on&facet.field=tags
>
> Upayavira
>
> On Thu, May 21, 2015, at 04:34 PM, Erick Erickson wrote:
> > Have you tried
> >
> > &fq=type:A
> >
> > Best,
> > Erick
> >
> > On Thu, May 21, 2015 at 5:49 AM, Danesh Kuruppu <dk...@gmail.com>
> > wrote:
> > > Hi all,
> > >
> > > Is it possible to do term search for the filtered result set. we can do
> > > term search for all documents. Can we do the term search only for the
> > > specified filtered result set.
> > >
> > > Lets says we have,
> > >
> > > Doc1 --> type: A
> > >              tags: T1 T2
> > >
> > > Doc2 --> type: A
> > >              tags: T1 T3
> > >
> > > Doc3 --> type: B
> > >              tags: T1 T4 T5
> > >
> > > Can we do term search for tags only in type:A documents, So that it
> gives
> > > the results as
> > > T1 - 02
> > > T2 - 01
> > > T3 - 01
> > >
> > > Is this possible? If so can you please share documents on this.
> > > Thanks
> > > Danesh
>

Re: Is it possible to do term Search for the filtered result set

Posted by Upayavira <uv...@odoko.co.uk>.
and then facet on the tags field.

&facet=on&facet.field=tags

Upayavira

On Thu, May 21, 2015, at 04:34 PM, Erick Erickson wrote:
> Have you tried
> 
> &fq=type:A
> 
> Best,
> Erick
> 
> On Thu, May 21, 2015 at 5:49 AM, Danesh Kuruppu <dk...@gmail.com>
> wrote:
> > Hi all,
> >
> > Is it possible to do term search for the filtered result set. we can do
> > term search for all documents. Can we do the term search only for the
> > specified filtered result set.
> >
> > Lets says we have,
> >
> > Doc1 --> type: A
> >              tags: T1 T2
> >
> > Doc2 --> type: A
> >              tags: T1 T3
> >
> > Doc3 --> type: B
> >              tags: T1 T4 T5
> >
> > Can we do term search for tags only in type:A documents, So that it gives
> > the results as
> > T1 - 02
> > T2 - 01
> > T3 - 01
> >
> > Is this possible? If so can you please share documents on this.
> > Thanks
> > Danesh

Re: Is it possible to do term Search for the filtered result set

Posted by Erick Erickson <er...@gmail.com>.
Have you tried

&fq=type:A

Best,
Erick

On Thu, May 21, 2015 at 5:49 AM, Danesh Kuruppu <dk...@gmail.com> wrote:
> Hi all,
>
> Is it possible to do term search for the filtered result set. we can do
> term search for all documents. Can we do the term search only for the
> specified filtered result set.
>
> Lets says we have,
>
> Doc1 --> type: A
>              tags: T1 T2
>
> Doc2 --> type: A
>              tags: T1 T3
>
> Doc3 --> type: B
>              tags: T1 T4 T5
>
> Can we do term search for tags only in type:A documents, So that it gives
> the results as
> T1 - 02
> T2 - 01
> T3 - 01
>
> Is this possible? If so can you please share documents on this.
> Thanks
> Danesh