search.services.index.results module¶
Functions for processing search results (after execution).
The primary public function in this module is to_documentset()
.
-
search.services.index.results.
to_document
(raw, highlight=True)[source]¶ Transform an ES search result back into a
Document
.Return type: Document
-
search.services.index.results.
to_documentset
(query, response, highlight=True)[source]¶ Transform a response from ES to a
DocumentSet
.Parameters: - query (
Query
) – The original search query. - response (
Response
) – The response from Elasticsearch.
Returns: The set of :class:`.Document`s responding to the query on the current page, along with pagination metadata.
Return type: Return type: - query (