Class QueryCommand.Builder
java.lang.Object
org.apache.solr.search.grouping.distributed.command.QueryCommand.Builder
- Enclosing class:
QueryCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setDocSet(SolrIndexSearcher searcher) Sets the docSet based on the createdDocSetsetDocsToCollect(int docsToCollect) setMainQuery(org.apache.lucene.search.Query mainQuery) Sets the main query used for fetching results.setNeedScores(boolean needScores) setQuery(String groupQueryString, SolrQueryRequest request) Sets the group query from the specified groupQueryString.setQuery(org.apache.lucene.search.Query query) Sets the group query.setSort(org.apache.lucene.search.Sort sort)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setSort
-
setQuery
Sets the group query.- Parameters:
query- TheQueryused for grouping- Returns:
- this
-
setMainQuery
Sets the main query used for fetching results. This is mainly used for computing the scores.- Parameters:
mainQuery- The top-level query- Returns:
- this
-
setQuery
public QueryCommand.Builder setQuery(String groupQueryString, SolrQueryRequest request) throws SyntaxError Sets the group query from the specified groupQueryString. The groupQueryString is parsed into a query.- Parameters:
groupQueryString- The group query string to parserequest- The current request- Returns:
- this
- Throws:
SyntaxError
-
setDocSet
-
setDocSet
Sets the docSet based on the createdDocSet- Parameters:
searcher- The searcher executing the- Returns:
- this
- Throws:
IOException- If I/O related errors occur.
-
setDocsToCollect
-
setNeedScores
-
build
-