Class: JayAPI::Elasticsearch::SearchAfterResults
- Inherits:
-
QueryResults
- Object
- QueryResults
- JayAPI::Elasticsearch::SearchAfterResults
- Defined in:
- lib/jay_api/elasticsearch/search_after_results.rb
Overview
A QueryResults class for the ‘search_after’ type of query. See more: www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html
Constant Summary collapse
- DEFAULT_FROM =
The default ‘from’ attribute for the ‘search_after’ query. See the link for more details. www.elastic.co/guide/en/elasticsearch/reference/current/paginate-search-results.html#:~:text=(default)%20or-,%2D1,-.
-1
Instance Attribute Summary
Attributes inherited from QueryResults
#batch_counter, #index, #query, #response
Instance Method Summary collapse
-
#more? ⇒ true
It should always be assumed that there are more results when using ‘search_after’ parameter.
-
#next_batch ⇒ JayAPI::Elasticsearch::QueryResults
Fetches the next batch of documents.
Methods inherited from QueryResults
Constructor Details
This class inherits a constructor from JayAPI::Elasticsearch::QueryResults
Instance Method Details
#more? ⇒ true
Returns It should always be assumed that there are more results when using ‘search_after’ parameter.
17 18 19 |
# File 'lib/jay_api/elasticsearch/search_after_results.rb', line 17 def more? true end |
#next_batch ⇒ JayAPI::Elasticsearch::QueryResults
Fetches the next batch of documents.
25 26 27 |
# File 'lib/jay_api/elasticsearch/search_after_results.rb', line 25 def next_batch index.search(adapt_query, batch_counter: batch_counter, type: :search_after) end |