Page MenuHomePhabricator

Is it possible to set some word matching (synonym) for CirrusSearch/elasticsearch?
Open, LowPublic

Description

Users might search 8 or eight for title, I want these two word could be synonym of each other in the search result. Similar problem exist when Japanese user search for 8. They might type 8 or 八つ.

I tried to enable synonym_filter in config/elasticsearch.yml

Then create a synonym.txt with content: 8, eight

By search though commond line "POST http://localhost:9200/moegirl_content/_search", I got both 8 and eight in return result. However, on website the MW search suggestion and the MW search result doesn't match both.

Hope Wikipedia can add these synonym in search result and search suggestion too. Some article have very similar variants in title. Users have to type exactly the word to find that article. Add some necessary synonym can benefit may people.

Event Timeline

Baskice created this task.Nov 18 2016, 2:53 PM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptNov 18 2016, 2:53 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Deskana triaged this task as Low priority.Dec 8 2016, 11:23 PM
Deskana added a subscriber: Deskana.

We tried doing something similar once with Wikidata; extract all the labels in different languages, and add them to the index. It didn't really work.

This is an interesting thing to look at in the future, but it would probably require quite a bit of work to build the list and add it to the index.