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

Fix for pelias/api#1077 #268

Closed
wants to merge 1 commit into from
Closed

Conversation

Joxit
Copy link
Member

@Joxit Joxit commented Feb 28, 2018

Fail to search Saint.. cities in structured queries

Add synonym for saint and sainte

@ghost ghost added the in review label Feb 28, 2018
@Joxit Joxit changed the title Fix for /~https://github.com/pelias/api/issues/1077 Fix for pelias/api#1077 Feb 28, 2018
Joxit added a commit to Joxit/pelias-api that referenced this pull request Feb 28, 2018
@orangejulius
Copy link
Member

orangejulius commented Mar 1, 2018

Hi @Joxit.
I think this looks good. It's honestly been a while since we've touched this code, and it's quite tricky to ensure synonyms don't have unexpected side effects, especially with autocomplete. However, because this only affects admin area analysers, which we will likely stop using soon for autocomplete (to be replaced by much improved admin area support from Placeholder), I doubt there are any possible problems. I even went so far as to find a case where an address exists in St Louis and other cities:

/v1/autocomplete?text=1443 park ave, saint louis
image

I tried all the combinations of abbreviations I could think of. The bad news is we already don't do a great job unless the city name is fully specified, the good news is that means we probably can't break it further :)

I'd love for @missinglink to chime in on this and pelias/api#1077 but it looks good to me!

orangejulius pushed a commit to pelias/api that referenced this pull request Mar 1, 2018
Joxit added a commit to Joxit/pelias-api that referenced this pull request Mar 3, 2018
@Joxit
Copy link
Member Author

Joxit commented Mar 22, 2018

Any news on this? This will be outdated with #272

(Up to date with master now)

…d queries

Add synonym for saint and sainte
@missinglink
Copy link
Member

missinglink commented Mar 23, 2018

Hi @Joxit, you caught us in a time of transition!

I just cleaned up the synonyms, standardizing them to the solr file format (and putting them in their own files) in #272.

In #273 I added the ability for users to add their own custom synonyms. (today I added support for 'admin' as well as for 'name' and 'street').

I opened #274 today to address this issue, it adds your synonyms to the synonyms/custom_admin.txt file and I added a couple more too. I also changed them to be synonyms instead of substitutions (using a comma instead of =>).

Let me know what you think?
Sorry, I wasn't able to rebase your commits, the history was getting too crazy!

tl;dr I added this commit custom_synonyms...custom_synonyms_admin

@Joxit
Copy link
Member Author

Joxit commented Mar 23, 2018

Hi @missinglink, Yeah I saw your refactoring 😉

It looks good to me. Nice job, I saw that you added fort and mount too.

The next step will be to clean pelias-api/sanitizer/_city_name_standardizer.js that's it ? (to keep only whitespace_normalized)

@orangejulius
Copy link
Member

orangejulius commented Mar 23, 2018

@Joxit I agree. I think pelias/api#767 which added that custom and america-centric handling of mt/st/fort can be replaced with some of the alias work we're doing and proper updates to data in WOF

@trescube
Copy link
Contributor

trescube commented Mar 23, 2018

The city name standardize stuff should go away, it's a relic of a time when we flirted with the idea of pulling analysis out of ES and into code.

@orangejulius
Copy link
Member

Hey, it solved some problems. And I think we may still pull more analysis out to make it replicable elsewhere.

@Joxit
Copy link
Member Author

Joxit commented Mar 23, 2018

@orangejulius this is a good idea.

@missinglink
Copy link
Member

changes merged in #274, thanks for your contribution!

@Joxit
Copy link
Member Author

Joxit commented Mar 26, 2018

Yeah! Nice, you are welcome ;-)

@Joxit Joxit deleted the fix/pelias-api/1077 branch October 25, 2018 15:03
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

Successfully merging this pull request may close these issues.

4 participants