Closed (fixed)
Project:
Search API Solr
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2015 at 12:59 UTC
Updated:
29 Jan 2016 at 18:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
drunken monkeyThe attached patch re-purposes the existing
site_hashconfiguration (which is now obsolete anyways, as I have pointed out previously) to hold this setting, placed in the "Advanced" section of the server settings. Making this a query option instead might be a better idea, though – I'm not sure.With this patch, the site hash will still always be indexed, but having it applied at search time is optional.
The patch also removes the equally obsolete
clean_idssetting.Comment #3
drunken monkeyComment #4
raj45 commentedIs this patch waiting to be tested, before it can be commited?
Comment #5
drunken monkeyYes, feedback that it works as intended would be needed. Also, a comment from one of the D8 branch maintainers would be nice (since I'm not so up-to-date with the D8 version of this module).
Comment #6
drunken monkeyAnyone?
Comment #7
raj45 commentedI can confirm that the patch works as designed, thank you @drunken monkey.
Comment #8
berdirWell, I don't know the module too well either but seems like the other maintainers are missing in action :)
Patch looks fine to me and works, according to #7. Thanks for the patch and testing. Committed.
Comment #9
raj45 commentedThanks @Berdir! I can't see the code in the latest dev-version 8.x-1.0-alpha1+7-dev from 2016-01-06 though...
Comment #10
berdirUh, indeed, sorry about that. I guess I forgot to push or so.
Unfortunately, the patch doesn't apply anymore.
Comment #11
madhavvyas commentedI am confirming "the patch doesn't apply anymore.". Not sure what action item pending in this ticket.
Comment #12
raj45 commentedIt needs a reroll I think.
Comment #13
raj45 commentedI tried updating the single line that is different, which changed in this patch: http://cgit.drupalcode.org/search_api_solr/commit/?id=c717068
I have attached the patch, feel free to test it.
Comment #14
drunken monkeyThe re-roll looks good to me. Did you test it, too?
Comment #15
raj45 commented@drunken monkey: I can confirm that the patch in post #13 applies cleanly to the latest dev-version 8.x-1.0-alpha1+8-dev:
Comment #16
berdirI think what he meant is if it actually works :)
Comment #17
raj45 commentedYou are probably right :-) And unfortunately it doesn't - I get a "Server error 500" if I try to perform a search, and in the logs it says:
RuntimeException: Autoloader not found: modules/search_api_solr/vendor/autoload.php in Drupal\search_api_solr\EventSubscriber\AutoloaderSubscriber->registerAutoloader() (line 63 of /var/www/html/website.local/public_html/modules/search_api_solr/src/EventSubscriber/AutoloaderSubscriber.php).My set up:
Comment #18
raj45 commentedI updated to latest dev-version of Search API, and am still getting the "Server 500" error, but no longer the Autoloader error. In stead I get this in the logs:
Notice: Undefined index: entity:node/body in Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->search() (line 740 of /var/www/html/webiste.local/public_html/modules/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php).Updated set up:
Comment #19
berdirI'm not sure if search_api already made changes again. Try to use the alpha version. And if that works, open a new issue to fix compatibility (again ;)).
Comment #20
raj45 commentedThanks @Berdir, I'll try with the Search API alpha version, and report back. I just need to restore my dev-site first, the field-definitions of my Solr index got lost somehow, which probably explains the
Notice: Undefined index: entity:node/body.Comment #21
raj45 commentedAll fields and processors are removed after I upgrade Search API from 8.x-1.0-alpha9+34-dev to 8.x-1.0-alpha11:
The pages
admin/config/search/search-api/index/index/fieldsandadmin/config/search/search-api/index/index/processorsare now empty.Comment #22
berdirYes, fields and processors moved out of options into their own top-level elements.
Search API has no upgrade path yet. So you're on your own when updating. It would be better to test this patch on a new installation to avoid issues that are actually upgrade problems.
Comment #23
drunken monkeyAlso, your error seems unrelated to this patch, but a problem with Composer autoloading. Did it really work before applying this patch, just with the dev version?
However, I also don't really know how this is supposed to work. I think you need to run
composer installinside the module directory, but using the Composer Manager module also seems to work fine.I don't think we made any changes that broke things again, so the two dev versions should work fine with each other. Look out for #2638116: Clean up caching of Index class method results (especially fields), though, which will again make API changes and might break something in this module.
Also, as Berdir says, there is currently no upgrade path for Search API, so better safe things before updating the code. In this case, you can probably just export the old index, and move the
fieldsandprocessorsblocks fromoptionsto the top level – that should be all that's needed. More changes are coming in the issue above, though.Comment #24
raj45 commentedThanks for the feedback from both of you.
I updated to the latest dev-version of Search API and Search API Solr, and applied the patch in #13 cleanly to Search API Solr. Subsequent tests went fine, and items were indexed to a shared Solr index.
I am having trouble getting a View to work afterwards though, and can't get an exposed filter to show up ... But that's probably another story. I get an "Server Error 500" and this in the log:
PHP Fatal error: Cannot access empty property in /data/www/dev.example.org/core/modules/views/src/ResultRow.php on line 44, referer: http://dev.example.org/By the way, I like the new way of selecting fields for the index, it's easier to quickly see which fields are activated.
Comment #25
berdirYeah, pretty sure that's a separate issue. Committed.