mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
more careful gallery search
This commit is contained in:
parent
3012de58b6
commit
c70e2e48d1
1 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ defmodule PhilomenaWeb.GalleryController do
|
|||
|
||||
defp parse_included_image(%{"include_image" => image_id}) when is_binary(image_id) and image_id not in [nil, ""] do
|
||||
with {image_id, _rest} <- Integer.parse(image_id) do
|
||||
[%{term: %{image_id: image_id}}]
|
||||
[%{term: %{image_ids: image_id}}]
|
||||
else
|
||||
_ ->
|
||||
[]
|
||||
|
@ -136,7 +136,7 @@ defmodule PhilomenaWeb.GalleryController do
|
|||
defp parse_included_image(_params), do: []
|
||||
|
||||
defp parse_description(%{"description" => description}) when is_binary(description) and description not in [nil, ""],
|
||||
do: [%{match: %{description: %{query: description, operator: :and}}}]
|
||||
do: [%{match_phrase: %{description: description}}]
|
||||
defp parse_description(_params), do: []
|
||||
|
||||
defp parse_sort(%{"gallery" => %{"sf" => sf, "sd" => sd}})
|
||||
|
@ -151,4 +151,4 @@ defmodule PhilomenaWeb.GalleryController do
|
|||
|
||||
defp position_order(%{order_position_asc: true}), do: "asc"
|
||||
defp position_order(_gallery), do: "desc"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue