Wrong field in admin_multi_match_first query
Describe the bug
Heeeeey @Joxit
I was investigating a bug report today and I noticed something on our dev server which looks incorrect: https://pelias.github.io/compare/#/v1/autocomplete?lang=de&text=Am+Gro%C3%9Fhausberg%2C+Furtwangen+im+Schwarzwald+deut&debug=1
Dev server is running a newer
masterbranch than the production server.![]()
The screenshot shows it's using
phrase.defaultbutname.de, is that possibly due to this PR? I would expect to seephrase.defaultandphrase.de.
Originally posted by @missinglink in https://github.com/pelias/api/pull/1493#issuecomment-709947256
Expected behavior
We should use the phrase.{lang} field instead of name.{lang}.
Additional context
Here is where we update the name.default field to phrase.default:
https://github.com/pelias/api/blob/5d202c48c0753f34f3401bd0c451449d53cf1e6b/query/view/admin_multi_match_first.js#L32-L37
The lang from clean is not available in this function... We may add a new property lang in the view ?