سؤال

I am making an api call where the user passes a string and the database is queried with that string. The correct results are returned but i want to add stopwords for different languages to use for extra filtering.

When i use words like 'and' etc. in the search it ignores it like it should, but this is only for English.

هل كانت مفيدة؟

المحلول

I created a custom search backend which extends whoosh_backend.SearchBackend and in the build_schema function passed the stopword list to the StemmingAnalyzer.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top