| Constructor and Description |
|---|
SearchImpl(IndexReader reader)
Constructs a SearchImpl that holds given
IndexReader |
| Modifier and Type | Method and Description |
|---|---|
Explanation |
explain(Query query,
int docid)
Explains the document for the specified query.
|
Query |
getCurrentQuery()
Returns the current query.
|
Collection<String> |
getRangeSearchableFieldNames()
Returns field names those are searchable by range query.
|
Collection<String> |
getSearchableFieldNames()
Returns field names those are searchable.
|
Collection<String> |
getSortableFieldNames()
Returns field names those are sortable.
|
Optional<SortField> |
getSortType(String name,
String type,
boolean reverse)
Returns the
SortField for the specified field with the sort type and order. |
List<SortField> |
guessSortTypes(String name)
Returns possible
SortFields for the specified field. |
Query |
mltQuery(int docid,
MLTConfig mltConfig,
Analyzer analyzer)
Creates the MoreLikeThis query for the specified document with given configurations.
|
Optional<SearchResults> |
nextPage()
Returns the next page for the current query.
|
Query |
parseQuery(String expression,
String defField,
Analyzer analyzer,
QueryParserConfig config,
boolean rewrite)
Parses the specified query expression with given configurations.
|
Optional<SearchResults> |
prevPage()
Returns the previous page for the current query.
|
SearchResults |
search(Query query,
SimilarityConfig simConfig,
Set<String> fieldsToLoad,
int pageSize,
boolean exactHitsCount)
Searches this index by the query with given configurations.
|
SearchResults |
search(Query query,
SimilarityConfig simConfig,
Sort sort,
Set<String> fieldsToLoad,
int pageSize,
boolean exactHitsCount)
Searches this index by the query with given sort criteria and configurations.
|
getFieldNamesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFieldNamespublic SearchImpl(IndexReader reader)
IndexReaderreader - - the index readerpublic Collection<String> getSortableFieldNames()
SearchgetSortableFieldNames in interface Searchpublic Collection<String> getSearchableFieldNames()
SearchgetSearchableFieldNames in interface Searchpublic Collection<String> getRangeSearchableFieldNames()
SearchgetRangeSearchableFieldNames in interface Searchpublic Query getCurrentQuery()
SearchgetCurrentQuery in interface Searchpublic Query parseQuery(String expression, String defField, Analyzer analyzer, QueryParserConfig config, boolean rewrite)
SearchparseQuery in interface Searchexpression - - query expressiondefField - - default field for the queryanalyzer - - analyzer for parsing query expressionconfig - - query parser configurationrewrite - - if true, re-written query is returnedpublic Query mltQuery(int docid, MLTConfig mltConfig, Analyzer analyzer)
Searchpublic SearchResults search(Query query, SimilarityConfig simConfig, Set<String> fieldsToLoad, int pageSize, boolean exactHitsCount)
Searchpublic SearchResults search(Query query, SimilarityConfig simConfig, Sort sort, Set<String> fieldsToLoad, int pageSize, boolean exactHitsCount)
Searchpublic Optional<SearchResults> nextPage()
Searchpublic Optional<SearchResults> prevPage()
Searchpublic List<SortField> guessSortTypes(String name)
SearchSortFields for the specified field.guessSortTypes in interface Searchname - - field namepublic Optional<SortField> getSortType(String name, String type, boolean reverse)
SearchSortField for the specified field with the sort type and order.getSortType in interface Searchname - - field nametype - - string representation for a typereverse - - if true, descending order is usedpublic Explanation explain(Query query, int docid)
SearchCopyright © 2000-2024 Apache Software Foundation. All Rights Reserved.