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 Mugeesh Husain <mu...@gmail.com> on 2015/11/04 09:23:13 UTC

Solr facet query(critical solr query response)

i am facing issue of how to get below response from solr query.

In my table, i have a two column vi and vk which has below values:

row1: vi:["ta"] ,vk:["s1"]
row2: vi:["tb"] ,vk:["s2"]
row3: vi:["tc"] ,vk:["s0"]
row4: vi:["td"] ,vk:["s2"]
row5: vi:["ta"] ,vk:["s1"] 
row5: vi:["tc"] ,vk:["s0"] and so on.

I want to facet in below way

ta-[so=0,s1=2,s2=0]
tb-[so=0,s1=1,s2=0]
tc-[so=2,s1=0,s2=0]
td-[so=0,s1=0,s2=0]

how i create query which i can get such response ?

Please suggestion 

Thanks,
Mugeesh









--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-facet-query-critical-solr-query-response-tp4238135.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr facet query(critical solr query response)

Posted by Alessandro Benedetti <ab...@apache.org>.
I suggest you to take a look to Yonik blog and in particular to the new
Json Faceting approach and Nested document modelling.
Hope this can help :

http://yonik.com/solr-nested-objects/ ( nested objects )

http://yonik.com/json-facet-api/ ( nested facets)

Cheers

On 4 November 2015 at 12:15, Mugeesh Husain <mu...@gmail.com> wrote:

> Thanks Erik
>
>  >>Shouldn't td have s2=1 also?  yes was my mistake
> I have also a search concern
>
> I have a 3 table Resturant, Review,User
>
> retuarant-[restid, restname,location...]
> User-[userid, uname,]
> Review-[reviewID, userid,restid,comment...]
>
> I am searching based on restaurant, how could i will find column of
> user&review
>
> Please give suggestion
>
> Thanks,
> Mugeesh
>
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-facet-query-critical-solr-query-response-tp4238135p4238180.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
--------------------------

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England

Re: Solr facet query(critical solr query response)

Posted by Mugeesh Husain <mu...@gmail.com>.
Thanks Erik  

 >>Shouldn't td have s2=1 also?  yes was my mistake
I have also a search concern

I have a 3 table Resturant, Review,User

retuarant-[restid, restname,location...]
User-[userid, uname,]
Review-[reviewID, userid,restid,comment...]

I am searching based on restaurant, how could i will find column of
user&review 

Please give suggestion 

Thanks, 
Mugeesh 
 






--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-facet-query-critical-solr-query-response-tp4238135p4238180.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr facet query(critical solr query response)

Posted by Erik Hatcher <er...@gmail.com>.
Shouldn't td have s2=1 also?  Try this:

      facet.pivot=vi,vk



> On Nov 4, 2015, at 03:23, Mugeesh Husain <mu...@gmail.com> wrote:
> 
> i am facing issue of how to get below response from solr query.
> 
> In my table, i have a two column vi and vk which has below values:
> 
> row1: vi:["ta"] ,vk:["s1"]
> row2: vi:["tb"] ,vk:["s2"]
> row3: vi:["tc"] ,vk:["s0"]
> row4: vi:["td"] ,vk:["s2"]
> row5: vi:["ta"] ,vk:["s1"] 
> row5: vi:["tc"] ,vk:["s0"] and so on.
> 
> I want to facet in below way
> 
> ta-[so=0,s1=2,s2=0]
> tb-[so=0,s1=1,s2=0]
> tc-[so=2,s1=0,s2=0]
> td-[so=0,s1=0,s2=0]
> 
> how i create query which i can get such response ?
> 
> Please suggestion 
> 
> Thanks,
> Mugeesh
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-facet-query-critical-solr-query-response-tp4238135.html
> Sent from the Solr - User mailing list archive at Nabble.com.