Use different body parameters for non-autocomplete requests

Created on 25 February 2025, about 1 month ago

If we use a single field for search and autocomplete, then the parameters used for autocomplete will be added to it on every request. Since it is not necessary to display duplicates during completion, it is set in the parameters not to display them. However, if we pass the value as a views parameter, then we need all the results.

  • Create an index with a fulltext field
  • Set autocomplete for this field
  • Create a search api based view page and add the field created in the index as exposed filter
  • Load the view page and start typing the text you want to search for in the field
  • Select a value that you know will be found in more than one result
  • Click submit
  • The view will list one row instead of all rows

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇭🇺Hungary dj1999

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024