After updating to Search API Autocomplete 1.4 (and also Search API 1.16 and Search API SOLR 1.9) I've started getting a lot of errors when trying to use Autocomplete. I have applied the database patches.

Autocomplete search search_api_views_search on index Content Index specifies an invalid suggester plugin .

Autocomplete search search_api_page_search on index Content Index specifies an invalid suggester plugin .

I see nowhere on the site to specify a suggester plugin. Looking at the documentation and information in the readme.txt it looks like I CAN specify a custom suggester plugin, but that I don't HAVE to. I'm not clear on what is going on here, and if this is a bug or if it's a documentation issue and I'm missing a config setting someplace.

I have looked at the server, index, filter, autocomplete, and search page level trying to find something/anything that mentions suggesters, and no dice. Any help would be appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lalweil created an issue. See original summary.

roborew’s picture

Hi lalweil, I ran into the same issue. Re-saving the autocomplete settings for the relevant View Index reveals the missing configuration settings; "Configure the Retrieve from server suggester plugin". From there you can choose the fields you wish to use. Hope this helps.

mikemadison’s picture

Component: Code » Documentation
Category: Bug report » Feature request

Perfect, works as described. I think this is unclear based on the update, and this should probably be included in both the version notes for Autocomplete, the Read Me file, and the online documentation.

mikemadison’s picture

Assigned: Unassigned » mikemadison
Status: Active » Needs review
FileSize
577 bytes

Attached is an update to the readme file that attempts to provide guidance on this issues so others can avoid it.

helmo’s picture

Thanks, re-saving works.

drunken monkey’s picture

Hm, strange. Actually, the database update function should take care of setting the default, "server", for all existing autocomplete configurations. So I'm not sure how this keeps happening. Are you maybe using a different database than MySQL/MariaDB?
It's in any case problematic since it's hard to test whether a database update function patch works correctly (since it's hard to run a database update again).

But if several people have that problem, maybe we should still try to solve it before everyone has updated. Could someone please test whether applying the attached patch and running the database updates (/update.php) also works to solve this problem? (And, if you don't have the problem anymore, whether it doesn't break anything?)

mikemadison’s picture

I'll give it a shot.

To confirm, yes I am running MySQL on my sites.

mikemadison’s picture

This appears to correct the problem.

Thanks Drunken!

mikemadison’s picture

Actually, I think I found the problem with this. Update 7103 has a default value set for the suggester_id but the schema above does not. I believe a default value of server should be added on line 43. Or maybe not. Honestly I'm not sure. But after working on several other environments we continue to have issues with the suggester not being set properly.

drunken monkey’s picture

The problem is that we can't set a default suggester plugin in the database schema, since the available suggesters can vary by index.
Instead, there is code to give newly created searches a valid suggester plugin as default. However, quickly testing it now, it seems this doesn't work as intended.

The attached patch should solve this. Would be great if I could get some testers! Just create a new autocomplete configuration for a search and verify it has a valid suggester plugin set (i.e., the error doesn't occur).

drunken monkey’s picture

Status: Needs review » Fixed

OK, I'm just gonna assume it works as expected.
Committed.

  • drunken monkey committed ab9cb22 on 7.x-1.x
    Issue #2572973 by drunken monkey: Fixed missing default value for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

alexmoreno’s picture

#10 patch worked fine. Would be good to have a new stable release with this, this broke our Qa and I assume we are not the only ones having that problem :-)