Open tailtq opened 2 years ago
@missinglink Could you please take a look?
I don't understand the issue completely, your description says:
I searched for the keyword Holland, Michigan and it
returned Holland but in the War language
(Austroasiatic language used by the minority of
people in Bangladesh and India). When mapping
into English, it turned into Baraga, which caused
confusion to the users.
However when I enter Holland, Michigan
in the demo I don't see Baraga
:
https://placeholder.demo.geocode.earth/demo/#eng
What am I missing?
Hi everyone, I'm using the
/parser/search
API to search a location using free-text. Can we have another option besideslang
to filter tokens by only a specific language? Thanks in advance.Use-cases
I searched for the keyword Holland, Michigan and it returned Holland but in the
War
language (Austroasiatic language used by the minority of people in Bangladesh and India). When mapping into English, it turned into Baraga, which caused confusion to the users.I have debugged and found the problem within this function: https://github.com/pelias/placeholder/blob/master/lib/Queries.js#L83-L105
As well as two queries
match_subject_distinct_subject_ids
andmatch_subject_autocomplete_distinct_subject_ids
Proposal
In my opinion, we should define an option to specify which languages or all of them should be used. For example, we can pass a
search_language
parameter with a value like "eng,fra" to filter tokens in English and French. If this option is ignored, we can filter all languages.The SQL queries after editing should be: