when we type 'pooj' we are getting match as pooja tower but it is hard to find which pooja tower as there could be N number. Thus we need suggestions like
Pooja tower , Gopalpura mode , jaipur
This way user will get an idea of place with the address.
Note. Tried mergeing two column into one with comma seprated but getting suggestions like
Are you using Search UI autocomplete configuration? If so, could you share your configuration please?
What you request isn't possible with suggestions type but is possible with result suggestions type as the result suggestion is a full hit result so the change would be to adjust the secondary fields ( address and phone number) to show in the autocomplete.
Thanks for the help. As I am new to this Elasticsearch World could you a better example base documentation other then results query suggestion documentation.
So I beleive that we can get search as you type suggestion from primary field with data from secondary field at suffix.
This way user will get more idea about primary field.
Please explain in laymen terms how we could achieve that. That would be a great help.
So if you're using App Search and Search UI, this code below should be similar for SearchBox:
<SearchBox
autocompleteMinimumCharacters={3}
autocompleteResults={{
linkTarget: "_blank",
sectionTitle: "Results",
titleField: "contactInformation", // the field just to present the result
urlField: "nps_link",
shouldTrackClickThrough: true,
clickThroughTags: ["test"]
}}
autocompleteSuggestions={true}
debounceLength={0}
/>
Now see the titleField property, thats the field you specify to display the result. In this example its title but you could create a new field (for example contactInformation) which contains "[Name] [Address] [Phone no]". That field contents will be present when matches in the autocomplete results are shown.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.