Hi,
This is a clone of https://www.drupal.org/node/2454865
I am using getlocations fields to get the user to fill his location (and get geocoded data) and now I want to display a facet based on the city which we get from the getlocations fields. Also I want to display the name which we get from getlocations fields as a sub-facet for the corresponding city but I am unable to do it.
When I enable a facet for it, I get a lot of unnecessary key words. (Like, all my titles also appear in this list)
Could someone help me out with getting this work ?
Image : https://www.drupal.org/files/issues/get.png ... as you can see, other than the city, lots of other keywords appear in the facet !
Comments
Comment #1
drunken monkeyThanks for reporting this problem!
After a quick look at the code it seems we have an error in our facetting code for fulltext fields, which means that facets on a fulltext field will combine the values of all those fields. (At least if I'm right in assuming you're using the "Database" service class for your server?)
Please test whether the attached patch (with no
--test_only
suffix) solves your problem!Comment #4
drunken monkeyThis one should pass.
Comment #5
drunken monkeyOK, the test is apparently not doing a very good job, and I see that we already have a solution (used in all other cases) for testing the returned facets. So, revised version attached.
Comment #6
drunken monkeyComment #7
drunken monkeyComment #9
drunken monkeyCommitted.
It seems the bug is there in D8, too, so moving the issue accordingly.
Comment #10
dragos-dumi CreditAttribution: dragos-dumi commentedPorted the test for branch 8.x-1.x
Added patch only with the test - should fail and a complete patch
Comment #14
drunken monkeyLooks great, thanks for the help!
Committed. (Only removed the two new blank lines.)
Comment #15
drunken monkey