Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong field in admin_multi_match_first query #1497

Open
Joxit opened this issue Oct 16, 2020 · 0 comments · May be fixed by #1498
Open

Wrong field in admin_multi_match_first query #1497

Joxit opened this issue Oct 16, 2020 · 0 comments · May be fixed by #1498
Assignees
Labels

Comments

@Joxit
Copy link
Member

Joxit commented Oct 16, 2020

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 master branch than the production server.

Screenshot 2020-10-16 at 11 51 25

The screenshot shows it's using phrase.default but name.de, is that possibly due to this PR?
I would expect to see phrase.default and phrase.de.

Originally posted by @missinglink in #1493 (comment)

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:

vsCopy.var('admin:add_name_to_multimatch:field', 'phrase.default');
adminFields.forEach(field => {
if( vsCopy.isset(`admin:${field}:field`) ){
vsCopy.var(`admin:${field}:field`, vsCopy.var(`admin:${field}:field`).get().replace('.ngram', ''));
}
});

The lang from clean is not available in this function... We may add a new property lang in the view ?

@Joxit Joxit added the bug label Oct 16, 2020
@Joxit Joxit self-assigned this Oct 16, 2020
@Joxit Joxit linked a pull request Oct 17, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant