Open missinglink opened 4 years ago
@orangejulius this test case seems to be fixed by what you've current got running on the staging server: https://pelias.github.io/compare/#/v1/autocomplete?text=Koh+Lanta%2C+Gothenburg%2C+Sweden&debug=1
Can you remind me what you changed which may have fixed this?
This is the branch: https://github.com/pelias/api/tree/disable-parser
There are two notable changes: the first is removing most of the parser logic to always return subject (as a test), and second, some of the query logic is changed. The primary must
query is changed from a match_phrase
to a match
, and then the match_phrase
query is duplicated, as a should
.
I believe that second change is something we should probably merge close to straight away, as it helps reduce overly strict requirements for matching. Removing the parser logic is probably too extreme, although we might look at effectively disabling it for very short inputs.
@orangejulius thank you for hinting into the "disable-parser" branch. Most of the geo-coding in Qatar is done by providing a venue name (e.g., Qatar Foundation | Al Nasr Tower | The Pearl | Villagio | etc.) and the search endpoint was unable to correctly resolve them because of the parser. I looked everywhere on how to disable it until I checked the branch you mentioned. In case someone who uses the docker version of pelias needs to do the same, you can simply download this file https://github.com/pelias/api/blob/master/sanitizer/_text_pelias_parser.js and mount it as a volume under the api service in docker-compose.yml as follows:
volumes:
- "./sanitizer/_text_pelias_parser.js:/home/pelias/sanitizer/_text_pelias_parser.js"
Hi folks,
I seem to have a similar issue. I'm run the latest docker build, and for me autocomplete is always empty but search always works.
So, for instance, v1/search?text=london
returns a lot of results, but v1/autocomplete?text=london
returns nothing.
I've just checked the logs now before pressing submit, and it appears that the autocomplete endpoint is unable to connect to elastic search, but the search one works just fine. For autocomplete I can see the following in the logs:
Elasticsearch WARNING: 2023-01-12T06:10:37Z
Unable to revive connection: http://elasticsearch:9200/
Elasticsearch WARNING: 2023-01-12T06:10:37Z
No living connections
Which is strange. I'll have a look at the setup and post back.
I don't see anything odd in my docker compose file. And obviously the search endpoint from the api container can connect just fine to the elastic endpoint, but the autocomplete one cannot, so it must be somewhere in the code?
Hi @meezaan, you issue is different from the one mentioned.
Can you please open a new issue and post your pelias.json file.
Thanks @missinglink. I may have found the problem, but if I have not I'll open another issue.
the document
openstreetmap:venue:node/3691534194
has the following label:however, when searching for the same record using this label no results are returned:
it's not clear why this is the case, requires some investigation.
note: this works correctly for
/v1/search