次の方法で共有


SearchPagedIterable Class

public final class SearchPagedIterable
extends PagedIterableBase<SearchResult,SearchPagedResponse>

Implementation of ContinuablePagedIterable where the continuation token type is SearchRequest, the element type is SearchResult, and the page type is SearchPagedResponse.

Constructor Summary

Constructor Description
SearchPagedIterable(SearchPagedFlux pagedFlux)

Creates an instance of SearchPagedIterable.

SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever)

Creates an instance of SearchPagedIterable.

SearchPagedIterable(Supplier<SearchPagedResponse> firstPageRetriever, Function<String,SearchPagedResponse> nextPageRetriever)

Creates an instance of SearchPagedIterable.

Method Summary

Modifier and Type Method and Description
Double getCoverage()

The percentage of the index covered in the search request.

Map<String,List<FacetResult>> getFacets()

The facet query results based on the search request.

SemanticSearchResults getSemanticResults()

The semantic search results based on the search request.

Long getTotalCount()

The approximate number of documents that matched the search and filter parameters in the request.

Methods inherited from IterableStream

Methods inherited from ContinuablePagedIterable

Methods inherited from java.lang.Object

Constructor Details

SearchPagedIterable

public SearchPagedIterable(SearchPagedFlux pagedFlux)

Creates an instance of SearchPagedIterable.

Parameters:

pagedFlux - The SearchPagedFlux that will be consumed as an iterable.

SearchPagedIterable

public SearchPagedIterable(Supplier firstPageRetriever)

Creates an instance of SearchPagedIterable. The constructor takes a Supplier. The Supplier returns the first page of SearchPagedResponse.

Parameters:

firstPageRetriever - Supplier that retrieves the first page

SearchPagedIterable

public SearchPagedIterable(Supplier firstPageRetriever, Function nextPageRetriever)

Creates an instance of SearchPagedIterable. The constructor takes a Supplier and Function. The Supplier returns the first page of SearchPagedResponse, the Function retrieves subsequent pages of SearchPagedResponse.

Parameters:

firstPageRetriever - Supplier that retrieves the first page
nextPageRetriever - Function that retrieves the next page given a continuation token

Method Details

getCoverage

public Double getCoverage()

The percentage of the index covered in the search request.

If minimumCoverage wasn't supplied in the request this will be null.

Returns:

The percentage of the index covered in the search request if minimumCoverage was set in the request, otherwise null.

getFacets

public Map> getFacets()

The facet query results based on the search request.

If facets weren't supplied in the request this will be null.

Returns:

The facet query results if facets were supplied in the request, otherwise null.

getSemanticResults

public SemanticSearchResults getSemanticResults()

The semantic search results based on the search request.

If semantic search wasn't requested this will return a SemanticSearchResults with no values.

Returns:

The semantic search results if semantic search was requested, otherwise an empty SemanticSearchResults.

getTotalCount

public Long getTotalCount()

The approximate number of documents that matched the search and filter parameters in the request.

If count is set to false in the request this will be null.

Returns:

The approximate number of documents that match the request if count is true, otherwise null.

Applies to