Skip to content
Snippets Groups Projects
Commit 6d19ce1ad65d authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[search_helpers] add explain extra options (wip)

parent 349114529872
No related branches found
No related tags found
No related merge requests found
......@@ -72,8 +72,9 @@
query=element,
fields=fields))
should.append(dsl_query.Fuzzy(_all=element))
# TODO - careful with explain for performance reasons, maybe skip if nb terms < 3
return search.query('bool',
must=must,
must_not=must_not,
should=should,
minimum_should_match="30%",
......@@ -75,6 +76,6 @@
return search.query('bool',
must=must,
must_not=must_not,
should=should,
minimum_should_match="30%",
)
).extra(explain=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment