I am using http://elasticsearch-dsl.readthedocs.io
Faced a strange behavior during search: some words that I pass to "should" query breaks search - search cannot find that words (I see that in console) - but also a lot of other words too.
In code below "should" query consist of 1000 clauses.
My guess was that this word is not in vocabulary (I use russian and english morphology config) - but no, with other unseen and special words search is good.
So, when i remove these "problem" words search is working again.
for i in eat_search_raw_list_1024: q = Q('bool', #must=[Q('match', text='BBQ')], should=[(Q("match", text="\'bad service\'~3") | Q("match", text="\'bad eat\'~3") .........1000 more................], minimum_should_match=1, _name=name_query ) s = Search(using=client, index="haystack").query(q).query(~Q("match", text=minus_words)) s = s.highlight('text', fragment_size=50) response = s.execute()