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 balaji <mc...@gmail.com> on 2012/03/12 10:16:47 UTC
SOLR Query Intersection
Hi ,
I am trying to Compare three independent queries,intersection among them
and draw an Venn diagram using the Google CHART . By using OR I will be
able to get the union of the 3 fields and using AND I will be able to get
the intersection among the three , Is it possible to get the union and
intersection among the fields in a same query
For ex :
I have 3 values which is under Multi-valued field browsers "Google ,
Firefox and IE " . I just need to find the no.of documents having only
google , Firefox etc.. and no.of documents having all the three and an
intersection among them like "Google & IE" , "Google & Firefox"
Is it possible to do with the Query Intersections or do I need to write
separate queries for all the above , If not please suggest how it can be
achieved
Thanks
Balaji
--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3818756.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR Query Intersection
Posted by balaji <mc...@gmail.com>.
Hi,
Thank you guys Erik and Mikhail , You saved my day
Thanks
Balaji
--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3819571.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR Query Intersection
Posted by Erik Hatcher <er...@gmail.com>.
I've done exactly this, rendering Venn diagrams using Google Charts from Solr. See my presentation here:
<http://www.slideshare.net/erikhatcher/rapid-prototyping-with-solr-5675936>
See slides 26-29, even with full code in the slides, but the code is also available here:
<https://github.com/erikhatcher/solr-rapid-prototyping/tree/master/ApacheCon2010>
And, yup, facet.query was leveraged for this.
Erik
On Mar 12, 2012, at 05:16 , balaji wrote:
> Hi ,
>
> I am trying to Compare three independent queries,intersection among them
> and draw an Venn diagram using the Google CHART . By using OR I will be
> able to get the union of the 3 fields and using AND I will be able to get
> the intersection among the three , Is it possible to get the union and
> intersection among the fields in a same query
>
> For ex :
>
> I have 3 values which is under Multi-valued field browsers "Google ,
> Firefox and IE " . I just need to find the no.of documents having only
> google , Firefox etc.. and no.of documents having all the three and an
> intersection among them like "Google & IE" , "Google & Firefox"
>
> Is it possible to do with the Query Intersections or do I need to write
> separate queries for all the above , If not please suggest how it can be
> achieved
>
>
> Thanks
> Balaji
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3818756.html
> Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR Query Intersection
Posted by balaji <mc...@gmail.com>.
Hi,
I got your point are you suggesting me to run using the *facet.query*
param for the various combinations
Thanks
Balaji
--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3819165.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR Query Intersection
Posted by balaji <mc...@gmail.com>.
Hi Mikhail,
Yes I am trying to get the facets counts for all these and populate the
chart , but comparison between the values is what I am wondering
Will facets handle all the 3 possible scenarios
Thanks
Balaji
--
View this message in context: http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3819111.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: SOLR Query Intersection
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
It sounds like facets http://wiki.apache.org/solr/SolrFacetingOverview .
Doesn't it?
On Mon, Mar 12, 2012 at 1:16 PM, balaji <mc...@gmail.com> wrote:
> Hi ,
>
> I am trying to Compare three independent queries,intersection among them
> and draw an Venn diagram using the Google CHART . By using OR I will be
> able to get the union of the 3 fields and using AND I will be able to get
> the intersection among the three , Is it possible to get the union and
> intersection among the fields in a same query
>
> For ex :
>
> I have 3 values which is under Multi-valued field browsers "Google ,
> Firefox and IE " . I just need to find the no.of documents having only
> google , Firefox etc.. and no.of documents having all the three and an
> intersection among them like "Google & IE" , "Google & Firefox"
>
> Is it possible to do with the Query Intersections or do I need to write
> separate queries for all the above , If not please suggest how it can be
> achieved
>
>
> Thanks
> Balaji
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/SOLR-Query-Intersection-tp3818756p3818756.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>