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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete: search string not found but expected. #488

Closed
oliverbienert opened this issue Dec 20, 2016 · 6 comments
Closed

autocomplete: search string not found but expected. #488

oliverbienert opened this issue Dec 20, 2016 · 6 comments

Comments

@oliverbienert
Copy link
Contributor

oliverbienert commented Dec 20, 2016

Hey team!

I was using your awesome geocoding engine when I noticed something interesting.
Let me tell you more about it.


Here's what I did 馃槆

(I removed api_key argument intentionally)
This returns zero results:
karl-liebknecht-str

But if remove the 'r' from the end of the string, I get the expected result:
karl-liebknecht-st

Interesting: Using search instead of autocomplete yields exactly the same results.

However, both queries should return roughly the same results, that is, a number of features labeled 'Karl-Liebknecht-Stra脽e...'

I'd like to know what's going on? I guess it's an elastic search issue, somehow?

For the following sub strings the result is empty:
*str
*stra
*stra脽
Then again, the exact search term (case-insensitive) 'karl-liebknecht-stra脽e' returns the expected result.

Is there a possibility to use wild cards?
Or is this a language issue?
Is this a stemming issue?
How can I make sure that german stemming is used?

Oliver

@orangejulius
Copy link
Member

orangejulius commented Dec 20, 2016

Hey @oliverbienert,
Thanks for reporting this. The answer is that we only store the first 18 characters of every word, but we should store more (obviously). We track this issue in pelias/schema#126.

An interesting side effect is that a query for karl liebknecht str will return results, because we store hyphenated street names both as one big long word, and as individual words, none of which by themselves exceed the 18 character maximum in this case.

@oliverbienert
Copy link
Contributor Author

Hej, thank you for quick response!
I see that this issue is still open since April, will this be solved any time soon?
Or is there a way to modify schema settings without forking?
Maybe by having my own settings and merging as in pelias-config?
I've never worked with elastic search until now.

@oliverbienert
Copy link
Contributor Author

oliverbienert commented Dec 21, 2016

Hi @orangejulius,

I think, we'll resolve the issue for now by increasing the max_gram parameter to 30 in our local instance as suggested in pelias/schema#126.

Thank you for the hint.
Shall I close the issue for now?

@orangejulius
Copy link
Member

Yes, let us know how it goes. There's nothing really stopping us from making the change, as I think there's not much work involved. It just hasn't been a huge priority.

@missinglink
Copy link
Member

I expect this issue to have been resolved in pelias/schema#224, at time of writing that code hasn't made it to production, leaving this ticket open until I can confirm it's resolved.

@orangejulius
Copy link
Member

Hi all!
Its been a while since we've updated anything here but this looks to be working great after we increased the max ngram size.

http://pelias.github.io/compare/#/v1/autocomplete%3Ftext=karl-liebknecht-str
image

We'll consider this fixed for now. Someday I'm sure we'll find an even longer (probably German) streetname, but until then, happy searching :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants