When I choose specific fields in the Override used fields settings, the autocomplete suggestions do not take effect.

The same suggestions from before, results from all the fields indexed by the server are displayed.

Any ideas?

Comments

jonnyeom created an issue. See original summary.

alan-ps’s picture

Project: Search API Autocomplete » Search API
Component: Code » Database backend
Status: Active » Needs review
StatusFileSize
new761 bytes

Looks like this is an issue of search_api module. The 'field_name' condition is missed in query and as a result all fields will be taken into account (even if we do not need them).

I've attached a patch for reviewing. I think it can help!

Status: Needs review » Needs work

The last submitted patch, 2: search_api_add-field-name-condition-2834350-2.patch, failed testing.

alan-ps’s picture

Status: Needs work » Needs review
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

I understand the reason behind this patch, I think it'd be great to have a test for this but because it's in the autocomplete part of the code, I guess we don't really need this.

  • drunken monkey committed daebd41 on 8.x-1.x authored by alan-ps
    Issue #2834350 by alan-ps: Fixed missing field restriction in DB backend...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Thanks a lot, looks good!
Committed.

Status: Fixed » Closed (fixed)

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