public class IndexQuery extends Object
Constructor and Description |
---|
IndexQuery()
Initializes a new instance of the
IndexQuery class. |
IndexQuery(String query) |
Modifier and Type | Method and Description |
---|---|
void |
appendQueryString(StringBuilder path) |
void |
appendQueryString(StringBuilder path,
boolean includePageSizeEvenIfNotExplicitlySet,
boolean includeQuery) |
IndexQuery |
clone() |
protected String |
getCustomQueryStringVariables() |
Date |
getCutoff()
Used to calculate index staleness.
|
Etag |
getCutoffEtag()
Gets or sets the cutoff etag.
|
String |
getDefaultField()
Default field to use when querying directly on the Lucene query
|
QueryOperator |
getDefaultOperator()
Changes the default operator mode we use for queries.
|
String[] |
getFieldsToFetch()
Array of fields that will be fetched.
|
HighlightedField[] |
getHighlightedFields()
Array of fields containing highlighting information.
|
String |
getHighlighterKeyName()
Gets highligter key name.
|
String[] |
getHighlighterPostTags()
Array of highlighter post tags that will be applied to highlighting results.
|
String[] |
getHighlighterPreTags()
Array of highlighter pre tags that will be applied to highlighting results.
|
String |
getIndexQueryUrl(String operationUrl,
String index,
String operationName) |
String |
getIndexQueryUrl(String operationUrl,
String index,
String operationName,
boolean includePageSizeEvenIfNotExplicitlySet) |
String |
getIndexQueryUrl(String operationUrl,
String index,
String operationName,
boolean includePageSizeEvenIfNotExplicitlySet,
boolean includeQuery)
Gets the index query URL.
|
String |
getMinimalQueryString() |
int |
getPageSize()
Maximum number of records that will be retrieved.
|
String |
getQuery()
Actual query that will be performed (Lucene syntax).
|
String |
getQueryString() |
String |
getResultsTransformer()
Name of transformer to use on query results.
|
Reference<Integer> |
getSkippedResults()
For internal use only.
|
SortedField[] |
getSortedFields()
Array of fields containing sorting information.
|
Map<String,SortOptions> |
getSortHints()
For internal use only.
|
int |
getStart()
Number of records that should be skipped.
|
Reference<Integer> |
getTotalSize()
For internal use only.
|
Map<String,RavenJToken> |
getTransformerParameters()
Parameters that will be passed to transformer (if specified).
|
boolean |
isAllowMultipleIndexEntriesForSameDocumentToResultTransformer()
If set to true, this property will send multiple index entries from the same document (assuming the index project them)
to the result transformer function.
|
boolean |
isDebugOptionGetIndexEntires()
Whatever we should get the raw index entries.
|
boolean |
isDisableCaching()
Whatever we should disable caching of query results
|
boolean |
isDistinct()
Whatever we should apply distinct operation to the query on the server side.
|
boolean |
isExplainScores()
Whatever a query result should contains an explanation about how docs scored against query
|
boolean |
isPageSizeSet() |
boolean |
isShowTimings() |
boolean |
isWaitForNonStaleResults()
CAUTION.
|
boolean |
isWaitForNonStaleResultsAsOfNow()
Used to calculate index staleness.
|
void |
setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean allowMultipleIndexEntriesForSameDocumentToResultTransformer)
If set to true, this property will send multiple index entries from the same document (assuming the index project them)
to the result transformer function.
|
void |
setCutoff(Date cutoff)
Used to calculate index staleness.
|
void |
setCutoffEtag(Etag cutoffEtag)
Gets or sets the cutoff etag.
|
void |
setDebugOptionGetIndexEntires(boolean debugOptionGetIndexEntires)
Whatever we should get the raw index entries.
|
void |
setDefaultField(String defaultField)
Default field to use when querying directly on the Lucene query
|
void |
setDefaultOperator(QueryOperator defaultOperator)
Changes the default operator mode we use for queries.
|
void |
setDisableCaching(boolean disableCaching)
Whatever we should disable caching of query results
|
void |
setDistinct(boolean distinct)
Whatever we should apply distinct operation to the query on the server side.
|
void |
setExplainScores(boolean explainScores)
Whatever a query result should contains an explanation about how docs scored against query
|
void |
setFieldsToFetch(String[] fieldsToFetch)
Array of fields that will be fetched.
|
void |
setHighlightedFields(HighlightedField[] highlightedFields)
Array of fields containing highlighting information.
|
void |
setHighlighterKeyName(String highlighterKeyName)
Sets highligter key name.
|
void |
setHighlighterPostTags(String[] highlighterPostTags)
Array of highlighter post tags that will be applied to highlighting results.
|
void |
setHighlighterPreTags(String[] highlighterPreTags)
Array of highlighter pre tags that will be applied to highlighting results.
|
void |
setPageSize(int pageSize)
Maximum number of records that will be retrieved.
|
void |
setQuery(String query)
Actual query that will be performed (Lucene syntax).
|
void |
setResultsTransformer(String resultsTransformer)
Name of transformer to use on query results.
|
void |
setShowTimings(boolean showTimings)
Indicates if detailed timings should be calculated for various query parts (Lucene search, loading documents, transforming results).
|
void |
setSkippedResults(Reference<Integer> skippedResults)
For internal use only.
|
void |
setSortedFields(SortedField[] sortedFields)
Array of fields containing sorting information.
|
void |
setSortHints(Map<String,SortOptions> sortHints)
For internal use only.
|
void |
setStart(int start)
Number of records that should be skipped.
|
void |
setTransformerParameters(Map<String,RavenJToken> transformerParameters)
Parameters that will be passed to transformer (if specified).
|
void |
setWaitForNonStaleResults(boolean waitForNonStaleResults)
CAUTION.
|
void |
setWaitForNonStaleResultsAsOfNow(boolean waitForNonStaleResultsAsOfNow)
Used to calculate index staleness.
|
String |
toString() |
public IndexQuery()
IndexQuery
class.public IndexQuery(String query)
public boolean isShowTimings()
public Map<String,SortOptions> getSortHints()
public void setSortHints(Map<String,SortOptions> sortHints)
sortHints
- public void setShowTimings(boolean showTimings)
showTimings
- public boolean isWaitForNonStaleResultsAsOfNow()
public boolean isWaitForNonStaleResults()
public void setWaitForNonStaleResults(boolean waitForNonStaleResults)
waitForNonStaleResults
- public void setWaitForNonStaleResultsAsOfNow(boolean waitForNonStaleResultsAsOfNow)
waitForNonStaleResultsAsOfNow
- public String getResultsTransformer()
public void setResultsTransformer(String resultsTransformer)
resultsTransformer
- public boolean isDistinct()
public void setDistinct(boolean distinct)
distinct
- public HighlightedField[] getHighlightedFields()
public void setHighlightedFields(HighlightedField[] highlightedFields)
highlightedFields
- public String[] getHighlighterPreTags()
public void setHighlighterPreTags(String[] highlighterPreTags)
highlighterPreTags
- public String[] getHighlighterPostTags()
public void setHighlighterPostTags(String[] highlighterPostTags)
highlighterPostTags
- public String getHighlighterKeyName()
public void setHighlighterKeyName(String highlighterKeyName)
highlighterKeyName
- public boolean isDisableCaching()
public void setDisableCaching(boolean disableCaching)
disableCaching
- public boolean isDebugOptionGetIndexEntires()
public boolean isExplainScores()
public void setExplainScores(boolean explainScores)
explainScores
- public void setDebugOptionGetIndexEntires(boolean debugOptionGetIndexEntires)
debugOptionGetIndexEntires
- public boolean isAllowMultipleIndexEntriesForSameDocumentToResultTransformer()
public void setAllowMultipleIndexEntriesForSameDocumentToResultTransformer(boolean allowMultipleIndexEntriesForSameDocumentToResultTransformer)
allowMultipleIndexEntriesForSameDocumentToResultTransformer
- public void setSkippedResults(Reference<Integer> skippedResults)
skippedResults
- public QueryOperator getDefaultOperator()
public void setDefaultOperator(QueryOperator defaultOperator)
defaultOperator
- public Etag getCutoffEtag()
public String getDefaultField()
public void setDefaultField(String defaultField)
defaultField
- public void setCutoffEtag(Etag cutoffEtag)
cutoffEtag
- public Date getCutoff()
public void setCutoff(Date cutoff)
cutoff
- public SortedField[] getSortedFields()
public void setSortedFields(SortedField[] sortedFields)
sortedFields
- public int getStart()
public void setStart(int start)
start
- public Map<String,RavenJToken> getTransformerParameters()
public void setTransformerParameters(Map<String,RavenJToken> transformerParameters)
transformerParameters
- public boolean isPageSizeSet()
public String getQuery()
public void setQuery(String query)
query
- public int getPageSize()
public void setPageSize(int pageSize)
pageSize
- public String[] getFieldsToFetch()
public void setFieldsToFetch(String[] fieldsToFetch)
fieldsToFetch
- public String getIndexQueryUrl(String operationUrl, String index, String operationName)
public String getIndexQueryUrl(String operationUrl, String index, String operationName, boolean includePageSizeEvenIfNotExplicitlySet)
public String getIndexQueryUrl(String operationUrl, String index, String operationName, boolean includePageSizeEvenIfNotExplicitlySet, boolean includeQuery)
operationUrl
- index
- operationName
- includePageSizeEvenIfNotExplicitlySet
- public String getMinimalQueryString()
public String getQueryString()
public void appendQueryString(StringBuilder path)
public void appendQueryString(StringBuilder path, boolean includePageSizeEvenIfNotExplicitlySet, boolean includeQuery)
protected String getCustomQueryStringVariables()
public IndexQuery clone()
Copyright © 2016. All Rights Reserved.