I'm a little confused here. Faceting is about counting docs that meet
your query restrictions. I.e. the "q=" and "fq=" clauses. So your original
problem statement simply cannot be combined into a single query
since your q= clauses are different. You could do something like
q=(firstterm OR secondterm)&facet.query=firstterm&facet.query=secondTerm
That would give you accurate facet counts for the terms, but it
certainly doesn't preserve the original intent of
q=firstterm&facet.query=blahblah.

But facet.query is only counted over the docs that match
the "q=" clause (well, the q= clause and any fq clauses). So perhaps
you can supply a few example input docs and desired counts on the other side.

Best
Erick

On Fri, Jun 7, 2013 at 8:01 AM, vrparekh <vrpar...@gmail.com> wrote:
> Hello All,
>
> I required facet counts for multiple SearchTerms.
> Currently I am doing two separate facet query on each search term with
> facet.range="dateField"
>
> e.g.
>
>      http://solrserver/select?q=1stsearchTerm&fq=on&facet-parameters
>
>      http://solrserver/select?q=2ndsearchTerm&fq=on&facet-parameters
>
> Note :: SearchTerm field will be text_en_splitting
>
> Now I have found another way to do facet query on multiple search term by
> tagging and excluding
>
> e.g.
>
>     http://solrurl/select?start=0&rows=10&hl=off&;
>     facet=on&
>     facet.range.start=2013-06-06T16%3a00%3a00Z&
>     facet.range.end=2013-06-07T16%3a00%3a01Z&
>     facet.range.gap=%2B1HOUR&
>     wt=xml&
>     sort=dateField+desc&
>     facet.range={!key=music+ex=movie}dateField&
>
> fq={!tag=music}content:"music"&facet.range={!key=movie+ex=music}dateField&
>     fq={!tag=movie}content:"movie"&q=(col2:1+)&
>
> fq=+dateField:[2013-06-05T16:00:00Z+TO+2013-06-07T16:00:00Z]+AND+(+Col1:"test"+)&
>     fl=col1,col2,col3
>
>
> I have tested for few search term , It is providing same result as different
> query for each search term.
> Is this the proper way (with results and performance)?
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/solr-facet-query-on-multiple-search-term-tp4068856.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to