Last active
July 21, 2022 08:43
-
-
Save rugyoga/6a742d8716c980be2515ad2c4f817c11 to your computer and use it in GitHub Desktop.
Create the initial ES Query based on PIT ID and a ES Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@spec initial(PIT.pit_t(), ES.query_t()) :: ES.query_t() | |
def initial(pit, query) do | |
%{ | |
query: query, | |
pit: %{id: pit, keep_alive: PIT.expiration()}, | |
size: ES.max_results(), | |
sort: %{"_shard_doc" => "desc"} | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment