Hi DW,
Is it intended that Swift_SearchField and the typeahead suggestions in the search use two different names for the query parameter?
It forces you to check on two different parameters in your Product.query
Swift_SearchField uses "q=" when you submit the form,
and the typeahead uses "eq=" when typing the in input field in the form
I've attached a picture below showing the files.
Best regards,
Mikkel Hammer
Developer forum
E-mail notifications
Two different query parameter names for Swift_SearchField and typeahead
Mikkel Hammer
Posted on 22/06/2022 09:09:59
Replies
Nicolai Pedersen
Posted on 22/06/2022 15:25:43
This post has been marked as an answer
Yes that is on purpose.
This is to make it possible to control what suggestions are available in the type ahead. The suggestions are nearest terms from one field only and that is what eq targets. The eq parameter is looking in a summary field that only contains data from the fields that you want suggestions from. It is also seperated because some of your fields for q parameter might be analyzed others not, which will be problematic for suggestions.
Votes for this answer: 1
Mikkel Hammer
Posted on 22/06/2022 15:33:16
Hi Nicolai,
That makes sense! Thanks a lot for the explanation
Best regards,
Mikkel Hammer
You must be logged in to post in the forum