diff --git a/lib/philomena/comments/query.ex b/lib/philomena/comments/query.ex index ca9f8797..332ff199 100644 --- a/lib/philomena/comments/query.ex +++ b/lib/philomena/comments/query.ex @@ -26,9 +26,10 @@ defmodule Philomena.Comments.Query do :ok, %{ bool: %{ - must: [ - %{term: %{anonymous: false}}, - %{wildcard: %{author: data}} + must: %{term: %{anonymous: false}}, + should: [ + %{wildcard: %{author: data}}, + %{term: %{author: data}} ] } } diff --git a/lib/philomena/posts/query.ex b/lib/philomena/posts/query.ex index 6fb1a365..7efb440f 100644 --- a/lib/philomena/posts/query.ex +++ b/lib/philomena/posts/query.ex @@ -26,9 +26,10 @@ defmodule Philomena.Posts.Query do :ok, %{ bool: %{ - must: [ - %{term: %{anonymous: false}}, - %{wildcard: %{author: data}} + must: %{term: %{anonymous: false}}, + should: [ + %{wildcard: %{author: data}}, + %{term: %{author: data}} ] } }