pelias / api

HTTP API for Pelias Geocoder
http://pelias.io
MIT License
221 stars 162 forks source link

Use only phrase.default field in search endpoint #1602

Closed orangejulius closed 2 years ago

orangejulius commented 2 years ago

This avoids use of the expensive name.default field, which includes partial tokens (ngrams)

This change is extremely beneficial to performance of search queries, especially those that are "gibberish".

In particular, it avoids the huge number of document matches that come from searching for addresses with the housenumber 1. With the name.default field in use, all records with a token that starts with 1 would be returned. That's generally not what we want for the search endpoint.