\Drupal\search_api_solr\Solr\SolrHelper tries to preg_match on \Solarium\QueryType\Select\Query\FilterQuery. We need to pass getQuery so it has a string.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mglaman created an issue. See original summary.

mglaman’s picture

Status: Active » Needs review
FileSize
807 bytes

This removes the error and passes "FIELD:VALUE" to preg_match.

mkalkbrenner’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Thanks for the patch!
As pointed out in https://www.drupal.org/node/2744733#comment-11366957 we don't have any test coverage for location / spatial searches at all. That has to be changed.
What do you think? Can you provide some test code, potentially based on https://www.drupal.org/node/2744733#comment-11454099 ?

mglaman’s picture

Yeah, I'll give it a shot. I'm working on a personal product, and I'll need the test coverage. Might be next weekend, however.

mkalkbrenner’s picture

That would be great!

mglaman’s picture

Haven't had time for testing. But re-rolling because patch fails. Again, filter query does not have a __toString method so we need to manually invoke this method.

mkalkbrenner’s picture

Status: Needs work » Closed (duplicate)
Issue tags: -Needs tests
Related issues: +#2744733: Add location as a supported DataType for SearchApiSolrBackend

It seems like the patch is already included in the latest patch for #2744733: Add location as a supported DataType for SearchApiSolrBackend. That's the patch that will be committed as soon there's some test coverage.
Please got ahead in that single issue. Thanks for reporting!