soltNet pivotFacet Key Question

13 views
Skip to first unread message

h jalalifar

unread,
Jan 20, 2015, 3:26:47 AM1/20/15
to sol...@googlegroups.com
i get query with this two field
 new SolrFacetPivotQuery
                        {
                            Fields = new[] {new PivotFields("category", "base_url")},
            
                        }

 when i want to give result of my facet
if (solrResult.FacetPivots.ContainsKey("category,base_url")) return false

 but below code return true
if (solrResult.FacetPivots.ContainsKey("base_url,category"))

and the Exception is "The given key was not present in the dictionary"
Do You Know why?

Mauricio Scheffer

unread,
Jan 20, 2015, 6:52:49 PM1/20/15
to sol...@googlegroups.com
That's weird, it seems as if the Solr server is swapping the fields in the response... can you try a basic pivot query in the browser?

Anyway, just in case, I've never used the feature but keep in mind that facet.pivot=category,base_url (which corresponds to new[] {new PivotFields("category", "base_url")}) is not the same as facet.pivot=category&facet.pivot=base_url (which is new[] {new PivotFields("category"), new PivotFields("base_url")})

For more on pivot faceting, see:


Cheers




--
Mauricio

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

h jalalifar

unread,
Jan 21, 2015, 1:03:13 AM1/21/15
to sol...@googlegroups.com
thanks a lot, but in my browser both of them are correct
i have this problem with solrnet

Mauricio Scheffer

unread,
Jan 21, 2015, 5:08:12 AM1/21/15
to sol...@googlegroups.com
There are tests checking the behavior of pivot queries in https://github.com/mausch/SolrNet/blob/master/SolrNet.Tests/SolrFacetPivotQueryTest.cs , so SolrNet is definitely not swapping the values... I'm afraid I can't do anything else without a failing test.

Cheers



--
Mauricio

Reply all
Reply to author
Forward
0 new messages