Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Started receiving an error when faceting with distance after setting a location filter on a Search API View. Any ideas? :)
An error occurred while trying to search with Solr: "500" Status: Server Error: Server Error{"error":{"trace":"java.lang.NullPointerException\n\tat com.spatial4j.core.io.ParseUtils.parsePoint(ParseUtils.java:42)\n\tat
org.apache.solr.schema.LatLonType.getRangeQuery(LatLonType.java:110)\n\tat org.apache.solr.parser.SolrQueryParserBase.getRangeQuery(SolrQueryParserBase.java:974)\n\tat
...
Never seen such an error before, and geo faceting worked ok before.
The location filter works fine, and I can see the distance facets just fine, but when I click on one of them I get this 500 error message from the server.
I am using solr 4.3.0
Comment | File | Size | Author |
---|---|---|---|
#7 | 2636016-7--fix_location_facet_filters.patch | 801 bytes | drunken monkey |
Comments
Comment #2
giorgio79 CreditAttribution: giorgio79 commentedComment #3
giorgio79 CreditAttribution: giorgio79 commentedComment #4
giorgio79 CreditAttribution: giorgio79 commentedComment #5
drunken monkeyDid you maybe not yet activate "Clean identifiers"?
In the Solr server settings in Drupal, please verify that there is no button to turn on that feature. If there is, please press it and re-index.
Comment #6
giorgio79 CreditAttribution: giorgio79 commentedNo such button. Would this button be available in a dev version? I would be happy to try.
Comment #7
drunken monkeyIf you're using Search API Solr 1.2 or higher, the button not being present means that clean identifiers are already used.
I now tried it out myself and, indeed, I could reproduce the problem. This just doesn't work anymore.
A bit of digging revealed this has apparently been broken ever since #1390598: Add a way to easily identify facet filters inside the query – i.e., for more than two years –, apparently without anyone noticing. So, thanks all the more for reporting this!
The attached patch should fix the problem. Please test!
Comment #8
giorgio79 CreditAttribution: giorgio79 commentedBeautiful! Thank you. I noticed this patch needs to go into Search API Solr though, not Search API Location :)
Comment #10
drunken monkeyGood to hear, thanks a lot for testing! (And for moving this to the right issue queue.)
Committed.
Comment #11
drunken monkeyComment #12
drunken monkey