Closed (fixed)
Project:
Search API Solr
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2016 at 15:11 UTC
Updated:
3 May 2017 at 15:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
acrosmanAdding related issues.
Comment #3
mkalkbrennerSolarium distinguish between various query types. I already considered a generic function like getQuery($type).
But it makes more sense to have an explicit call for a required type. I recently added getTermsQuery().
Which query type do you need?
Comment #4
acrosmanThis is my attempt to generalize the issue that was raised for the attachments module. If the generic is problematic is there a reason not to create a function for each query type so they are all exposed?
Comment #5
ekes commentedIs there a reason to abstract away Solarium completely?
Could there not just be a method to get $solr and modules requiring to do something special could just operate with the Solarium API with the connection already set?
Comment #6
mkalkbrennerThe problem is that there's not just "one connection". A solr service provider could have different endpoints and different handlers. For example the term query sends a request to the "terms" request handler by default in solarium. A service provider might change this.
Personally I plan to do so for the suggester query because we'll have multiple of them.
And some query types might require additional plugins to successully connect a service provider's installation.
I'm not a fan of abstracting libraries but I think it would be the best to have a dedicated getter for each query type.
If anyone has time for such a patch, please go ahead ;-)
Comment #7
ekes commented>> Is there a reason to abstract away Solarium completely?
> A solr service provider could have different endpoints and different handlers... A service provider might change this.
Yes then :-) So adding them one-by-one as needed:-
The createExtract() and extract() presently used by search_api_attachment. I've standardized the name as the same as the rest of SolrConnectorInterface, thus getExtractQuery. But the arguments, and returns, are exactly as they are in Solarium. This works with the search_api_attachment test; not sure if there is an obvious non-trivial test that can be written in search_api_solr module.
Comment #8
ekes commentedComment #10
mkalkbrennerIt would be great to have an integration test like we have for facets and search_api_autocomplete. But that could be done in a new issue.
Comment #11
ekes commentedDid this as a pull request https://github.com/mkalkbrenner/search_api_solr/pull/12 because it's easier with a binary file now.
Comment #12
J.Campbell commentedI've applied this patch to my test environment, it is working correctly so far.
Comment #13
mkalkbrenner@ekes: I merged your pull request and adjusted it. thanks :-)
BTW your patch discovered some general issues with our default configs regarding libs.
Comment #15
simon_h commentedI have installed the latest version of Search API Solr Search with this patch but my files aren't indexed anymore. Previously I had this patch: https://www.drupal.org/files/issues/unexpected-error-after-saving-config..., which worked in my case. I made sure I have the latest version of Search API Attachement and Search API Solr Search. Anybody has a simular issue?
Comment #16
mkalkbrennerAt least you need to apply the latest patch from #2696901: Leverage extraction support of Search API Solr integration, fix incompatibilities for various solr service providers incl. Acquia Search