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

Search terms should map to nearest term in the database #23

Closed
anselmbradford opened this issue Jun 4, 2013 · 5 comments
Closed

Search terms should map to nearest term in the database #23

anselmbradford opened this issue Jun 4, 2013 · 5 comments

Comments

@anselmbradford
Copy link
Member

Related search terms should map to a synonym of the term in the database. For instance, searches for "food," "meal," "dinner," etc. might all resolve to "Food" or "Food Program"

This was issue codeforamerica/ohana-web-search#18 in HSF and has been moved here.

@monfresh
Copy link
Member

This doesn't come for free with elastic search. You have to manually configure synonyms: http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter/

Since Elastic Search is not trivial to understand and implement, the easiest solution — which would yield the same benefits — would be to define additional keywords that should map to each of the categories. Once that list is defined, it would take a few seconds to add them to the DB.

@monfresh
Copy link
Member

Also, this list doesn't have to be defined in advance. It should be data-driven. We can use Google Analytics to see which terms people are searching for, and if they don't already exist in the DB, we can add them. This can probably be automated using the GA API and a script that updates the DB.

@monfresh
Copy link
Member

monfresh commented Jun 5, 2014

This doesn't sound like something the API should be responsible for. It seems more like a data quality issue to me. If a search for a certain term should return a particular location, then the location's description, the service's keywords and/or categories field should be updated to include those terms.

@anselmbradford
Copy link
Member Author

Could this be the responsibility of a script in /scripts that goes through each entry and looks for specific keywords in the description and adds synonyms of those keywords in the keywords field if they are absent? Seems like that could be a straightforward way to handle this. Also seems setting that up may be out of scope :), but maybe as a hack request?

@monfresh
Copy link
Member

monfresh commented Jun 5, 2014

Nyet. Such a script wouldn't help if the description itself doesn't contain the right terms. This is a data issue that should be dealt with by maintainers of the data. I'm closing this.

@monfresh monfresh closed this as completed Jun 5, 2014
animista01 pushed a commit to IOfoundation/ohana-api that referenced this issue May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants