Strange behavior: some words breaks search

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()

Hey,

as you are trying to execute a match query, but you are using the syntax of the query_string query inside of the text, no documents might be found.

Have you tried this with only a single match query, to see if anything is matched at all?

--Alex

Hm, yes you are right that this is query_string query but this is working part of code - it finds some expected posts. It stop working only with some words combinations

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.