more comprehensive fix

This commit is contained in:
byte[] 2020-01-22 09:12:37 -05:00
parent f47e9f5e05
commit c2d26029ae
2 changed files with 20 additions and 8 deletions

View file

@ -26,10 +26,16 @@ defmodule Philomena.Comments.Query do
:ok, :ok,
%{ %{
bool: %{ bool: %{
must: %{term: %{anonymous: false}}, must: [
should: [ %{term: %{anonymous: false}},
%{wildcard: %{author: data}}, %{
%{term: %{author: data}} bool: %{
should: [
%{term: %{author: data}},
%{wildcard: %{author: data}}
]
}
}
] ]
} }
} }

View file

@ -26,10 +26,16 @@ defmodule Philomena.Posts.Query do
:ok, :ok,
%{ %{
bool: %{ bool: %{
must: %{term: %{anonymous: false}}, must: [
should: [ %{term: %{anonymous: false}},
%{wildcard: %{author: data}}, %{
%{term: %{author: data}} bool: %{
should: [
%{term: %{author: String.downcase(data)}},
%{wildcard: %{author: String.downcase(data)}}
]
}
}
] ]
} }
} }