I have a collection of documents in an Elasticsearch index. Each document has a name, some tags and a geopoint representing its location.
I am also using the AutoComplete Predictions API provided by Google. Currently, I have a single search field that searches twice, using both sources and then merges the results (document suggestions from ES and place suggestions from Google Maps).
How could I make that search field to work the following way:
Searching for "<name> <location>" or "<location> <name>" would return the documents matching <name> that are close to the results for <location> returned by Google Maps.
<name> will often be multiple words and <location> will often be multiple words (for example, "John Doe New York").
In short, what's the smartest way to mix results from multiple sources in a single field?
Aucun commentaire:
Enregistrer un commentaire