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

Geo Context Suggester: Refine precision #5621

Closed
spinscale opened this issue Mar 31, 2014 · 6 comments · Fixed by #5647
Closed

Geo Context Suggester: Refine precision #5621

spinscale opened this issue Mar 31, 2014 · 6 comments · Fixed by #5647
Labels
>enhancement :Search/Suggesters "Did you mean" and suggestions as you type v1.2.0 v2.0.0-beta1

Comments

@spinscale
Copy link
Contributor

This is a followup of #5525 and #5596

The current default precision of the context suggester is 12, representing the length of the geohash being twelve chars long.

This means, that without specifying the precision in the mapping a default geo context based query will its own geo cell and its neighbours as the context by default. This means it will cover an area of about 5x5 cm for suggestions (if I calculated it correctly)... which seems not to be a reasonable default.

We should either change this or force setting a precision in the mapping, so the user has to think about the precision.

@clintongormley
Copy link

Agreed. Perhaps ~5km == precision 5?

@clintongormley
Copy link

I'd also be OK with requiring a precision - that way it forces the user to think about it.

@spinscale
Copy link
Contributor Author

forgot to mention that: You can define the precision as an int, which is the length of the geohash or as an string, which will be one of our distanceunits then... that is working now already... maybe it makes sense to drop the geohash length precision anyway, as noone thinks in those terms?

@clintongormley
Copy link

I'd keep it - helps to explain why, if you say "1km" you don't get exactly 1km.

@spinscale
Copy link
Contributor Author

+1 on my side for forcing a precision - we really cant tell

@s1monw
Copy link
Contributor

s1monw commented Mar 31, 2014

++

imotov pushed a commit to imotov/elasticsearch that referenced this issue Mar 31, 2014
spinscale added a commit that referenced this issue Apr 2, 2014
The default precision was way too exact and could lead people to
think that geo context suggestions are not working. This patch now
requires you to set the precision in the mapping, as elasticsearch itself
can never tell exactly, what the required precision for the users
suggestions are.

Closes #5621
@clintongormley clintongormley added >enhancement v2.0.0-beta1 v1.2.0 :Search/Suggesters "Did you mean" and suggestions as you type labels Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Suggesters "Did you mean" and suggestions as you type v1.2.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants