mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
more comprehensive fix
This commit is contained in:
parent
f47e9f5e05
commit
c2d26029ae
2 changed files with 20 additions and 8 deletions
|
@ -26,10 +26,16 @@ defmodule Philomena.Comments.Query do
|
|||
:ok,
|
||||
%{
|
||||
bool: %{
|
||||
must: %{term: %{anonymous: false}},
|
||||
should: [
|
||||
%{wildcard: %{author: data}},
|
||||
%{term: %{author: data}}
|
||||
must: [
|
||||
%{term: %{anonymous: false}},
|
||||
%{
|
||||
bool: %{
|
||||
should: [
|
||||
%{term: %{author: data}},
|
||||
%{wildcard: %{author: data}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,16 @@ defmodule Philomena.Posts.Query do
|
|||
:ok,
|
||||
%{
|
||||
bool: %{
|
||||
must: %{term: %{anonymous: false}},
|
||||
should: [
|
||||
%{wildcard: %{author: data}},
|
||||
%{term: %{author: data}}
|
||||
must: [
|
||||
%{term: %{anonymous: false}},
|
||||
%{
|
||||
bool: %{
|
||||
should: [
|
||||
%{term: %{author: String.downcase(data)}},
|
||||
%{wildcard: %{author: String.downcase(data)}}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue