no results for empty query
This commit is contained in:
parent
53ed483f9c
commit
a2ff9480cf
1 changed files with 3 additions and 1 deletions
|
@ -63,7 +63,9 @@ class FulltextMixin:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def find_fulltext_ids(cls, query):
|
def find_fulltext_ids(cls, query):
|
||||||
if query and query[0] == '"' and query[-1] == '"':
|
if not query:
|
||||||
|
return []
|
||||||
|
elif query[0] == '"' and query[-1] == '"':
|
||||||
query = {
|
query = {
|
||||||
"match_phrase": {
|
"match_phrase": {
|
||||||
"text": query.lower()[1:-1]
|
"text": query.lower()[1:-1]
|
||||||
|
|
Loading…
Reference in a new issue