I seem to have found an issue with the stop words functionality in algolia – it seems that French language stop words to not seem to match properly, We have attached the following stop words to our index, as shown in image 1. However, image 2 shows that these words are still being matched. We have made sure the index language is set to French. Any idea why this is is happening?
Thanks for contacting Algolia! You are on the correct tab to turn utilize stop words, however the location where you have included the french word
"comment" is actually for the optional words feature. However, I can see how this can be confusing from the UI. More on this below!
As noted, you included
"comment" in the
optionalWords set of values. This means that when the Algolia engine is matching your text query words in a record, the word
"comment" is optional (i.e., it does not need to be in the record for it to be considered a hit). The record you are seeing is still included in results because it does include the text match on “comment”.
Whereas you can set optionalWords, conversely the
removeStopWords collection is a pre-defined dictionary. I have included an excerpt below that shows we have not considered
"comment" a stop word for removal:
Our internal dictionary for french is based on https://www.ranks.nl/stopwords/french, however +/- a few words, including
I hope this clarifies your results.
thank you ajay, yes that makes sense – it would be helpful, however, in the browser UI to display the optional words with a different highlighted colour.