Closed eklem closed 8 years ago
https://github.com/NaturalNode/natural#stemmers
The general strategy would be to index stems on the way in, and then do a search for the search term and its stem.
I was more thinking about something like:
car -> transportation
When the user has one vocabulary, and the content/organization a different vocabulary.
Sorry- yes, you are talking about synonyms and I am talking about stemming- doh!
In a way, synonyms are easier to solve, because you just set up a query processor that substitutes in the synonym
[
{
AND: {body: ['car', 'repair']}
}
]
...transformation ('car' -> 'automobile')...
[
{
AND: {body: ['car', 'repair']}
},
{
AND: {body: ['automobile', 'repair']}
}
]
And, you can get some clear indications that you need to add synonyms if you have logging on 0 results queries.
Could be cool to create a small synonyms module where you could connect a google drive spreadsheet with synonyms.
Just the layout for the synonyms-module.
Figure out which synonyms to add and how to do it wit OR-search (expand search with more OR-queries, but boost the original query)