Autocomplete Not Suggesting More than 1 Word

Created on 19 March 2023, almost 2 years ago
Updated 26 June 2023, over 1 year ago

Problem/Motivation

When using Search API Autocomplete with the Retrieve from Server Suggestor Plugin setup below, autocomplete does not suggest additional words (more than 1 word).

May you please provide any immediate advice or recommendations?

Steps to reproduce

1) In the fields tab of the search API index, there is a taxonomy name field that is Fulltext Tokens type.
2) In the autocomplete settings of the index, it is set to Retrieve from the Server for the Suggestor plugin, and is only filtering on the taxonomy name field for its suggestions.
3) For the view's Fulltext Search, it is searching for that taxonomy name field alongside content, and also has a parse mode of Multiple Words.
4) Create a content titled "Test Content"
5) Index the Search index.
6) User searches "test"
6a) Expected result: "Test Content" is a suggestion.
6b) Actual result: Only "Test" is a suggestion, but if you start typing the second word (e.g. searching "Test Co"), "Test Content" becomes a suggestion.

Drupal 9.3.16
Search API Autocomplete: 8.x-1.4
Search API: 8.x-1.19
Search API Solr: 4.2.1

💬 Support request
Status

Fixed

Version

1.4

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bruce.yuen
  • Status changed to Fixed almost 2 years ago
  • 🇦🇹Austria drunken monkey Vienna, Austria

    This is the expected behavior, nothing wrong with only suggesting a completion for the currently typed word. If you want different behavior, you’ll probably have to implement your own Suggester plugin. (Though, for your specific example, with the words in question being part of the title, using the “Display live results” suggester with its “Suggest result labels as keywords” option might also work. So maybe give that a try?)

    Also, this behavior is actually not implemented in this module, but in the Search API Solr module, so that’s where you’d have to direct a feature request for changing this.

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

  • Status changed to Fixed over 1 year ago
  • 🇬🇧United Kingdom hasozduru

    I am having the same issue as well. drunken monkey, I tried “Display live results” suggester with its “Suggest result labels as keywords” but it doesn't work. Would be nice if you could suggest alternative solution.

    Thanks a lot.

Production build 0.71.5 2024