Class QueryRequest
- java.lang.Object
-
- com.attivio.sdk.esb.AbstractPlatformMessage
-
- com.attivio.sdk.search.QueryRequest
-
- All Implemented Interfaces:
PlatformMessage
,LocaleAware
,java.io.Serializable
,java.lang.Cloneable
public class QueryRequest extends AbstractPlatformMessage implements LocaleAware, java.lang.Cloneable, java.io.Serializable
Represents a search query and all associated meta data about the query such as sorting, faceting, linguistic options, etc.When a QueryRequest is sent to AIE, a
QueryResponse
will be returned as the result. Use aSearchClient
for sending QueryRequests to an AIE instance.Paging
The
setOffset(long)
andsetRows(long)
methods can be used in order to page through results. Offset indicates the index into the overall result set for the first returned row. Rows indicates the number of rows that will be returned.QueryRequest request; // Request the first "page" of 10 results request = new QueryRequest("*:*"); request.setOffset(0); request.setRows(10); // ... (Submit the search and handle response) // Request the second "page" of 10 results request = new QueryRequest("*:*"); request.setOffset(10); request.setRows(10); // ... (Submit the search and handle response)
Query Resubmission
The
setMaxResubmits(int)
method can be used to control automatic query resubmission. A QueryRequest may be automatically resubmitted to the search engine in case of recoverable error, 0 result response, or other reasons. The configuration for AIE's query workflows will indicate what resubmission may occur. NOTE: resubmission is disabled by default.// Allow 1 resubmission QueryRequest request = new QueryRequest("*:*"); request.setMaxResubmits(1); // ... (submit the search and handle response)
Field Expressions
The
addField(String)
andaddField(FieldRequest)
methods can be used to request specified fields to returned for the matching documents. By default, all stored fields will be returned. NOTE: if you add a field expression and still want all fields returned in addition to the FieldExpression, you should add the "*" field as well (see below example).FieldExpression
s allow returning custom fields derived from stored fields (or generated based on query executed).QueryRequest request; // Request just the "text" field request = new QueryRequest("*:*"); request.addField("text"); // ... (submit the search and handle response) // Request the "Geo Distance" Field expression (include all stored fields as well) request = new QueryRequest("*:*"); request.addField("*"); // Request all stored fields request.addField(new GeoDistance("position", centerLatitude, centerLongitude)); // ... (submit the search and handle response)
Boost Queries
The
addBoostQuery(Query)
method allows adding a query to use for boosting purposes. The documents that match this query will get an additional boost however this boost query will not affect the documents that match this QueryRequest.// Match all documents, boosting documents with "foo" in the title higher QueryRequest request = new QueryRequest("*:*"); request.addBoostQuery(new QueryString("title:foo")); // ... (submit the search and handle response)
Score Functions
The
addScoreFunction(FieldExpression)
method allows adding function based boosts to documents matching the QueryRequest.// Give a static boost to documents based on the indexed value for the "staticboost" field QueryRequest request = new QueryRequest("*:*"); request.addScoreFunction("staticboost"); // ... (submit the search and handle response)
Sorting
The
addSort(Sort)
method allows specifying the sort criteria for the QueryRequest. If no sort criteria is added, then the QueryRequest will be sorted by score descending. Multiple levels of sorting can be added to perform tie-breaking in the event that multiple documents have the same value for a sort.// Sort by "size" ascending QueryRequest request = new QueryRequest("*:*"); request.addSort(new Sort("size", Sort.SortOrder.DESCENDING)); // ... (submit the search and handle response)
Faceting
The
addFacet(FacetRequest[])
andaddFacetField(String[])
methods allow requesting facets to be returned along with the results. There are different types of facets that can be requested for a query. The simplest will return counts for all discrete values for a facet field (FacetRequest
).RangeFacetRequest
can be used to return buckets for specified ranges of values.FilterBasedFacetRequest
can be used to get a bucket count for any arbitraryQuery
over the result set.QueryRequest request = new QueryRequest("*:*"); // request a facet for the author field request.addFacetField("author"); // request a "range" facet with 10 buckets for values between 0 and 1000 request.addFacet(new RangeFacetRequest("size", 0, 1000, 10)); // ... (submit the search and handle response)
Filtering
The
addFilter(Query)
method allows adding filters to the QueryRequest to restrict the matching documents to those that also match the filter. NOTE: applied filters do not modify the score of the document.// Filter result set to the "documents" table QueryRequest request = new QueryRequest("*:*"); request.addFilter(new PhraseQuery("table", "documents")); // ... (submit the search and handle response)
WARNING: QueryRequests should not be reused. Reusing a QueryRequest for multiple searches can have adverse effects especially if run inside a single JVM.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QueryRequest.AcronymsMode
Modes for Acronym Expansion.static class
QueryRequest.FacetFinderMode
Modes for FacetFinder.static class
QueryRequest.SpellCheckMode
Modes for spell checking.static class
QueryRequest.StopwordsMode
Modes for Stopword removalstatic class
QueryRequest.SynonymsMode
Modes for Synonym Expansion.
-
Field Summary
-
Fields inherited from interface com.attivio.sdk.esb.PlatformMessage
DEFAULT_MAX_LOG_LENGTH, MESSAGE_DROPPED, MESSAGE_SEND_TIME_PROP, PROP_MAX_LOG_LENGTH
-
-
Constructor Summary
Constructors Constructor Description QueryRequest()
The default constructor.QueryRequest(Query query)
Constructor with aQuery
.QueryRequest(java.lang.String query)
Constructor with a string query.QueryRequest(java.lang.String query, java.lang.String language)
Constructor with a query string and query language.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addBoostQuery(Query boost)
Add a boost query.void
addFacet(FacetRequest... f)
Adds allFacetRequest
s to this QueryRequest.void
addFacetField(java.lang.String... fieldNames)
Adds aFacetRequest
for all specified fields.void
addFacetFilter(FacetFilter bucket)
Adds a filter to this QueryRequest that will "drill down" onbucket
.QueryRequest
addField(FieldExpression field)
Add a FieldExpression to return for this QueryRequest.QueryRequest
addField(FieldExpression field, java.lang.String name)
Add a field to return in the response documents.QueryRequest
addField(FieldRequest field)
Add aFieldRequest
to return for this QueryRequest.QueryRequest
addField(java.lang.String field)
Add a field to return in the response documents.void
addFilter(Query f)
Add a filterQuery
to this QueryRequest.void
addFilter(java.lang.String exp)
Add a filter query to this QueryRequest.void
addFilter(java.lang.String exp, java.lang.String langSpec)
Add a filter query to this QueryRequest.void
addScoreFunction(FieldExpression value)
Add a scoring function to this QueryRequest.void
addScoreFunction(FieldExpression... value)
Add a scoring function to this QueryRequest.void
addScoreFunction(java.lang.String value)
Add a scoring function to this QueryRequest.void
addScoreFunction(java.lang.String... value)
Add a scoring function to this QueryRequest.void
addSort(FieldExpression field, Sort.SortOrder order)
void
addSort(Sort value)
Add aSort
specifier to this QueryRequest.void
addSort(java.lang.String field, Sort.SortOrder order)
QueryRequest
clone()
Clones the object and resets message ID to -1.static QueryRequest
create(CgiRequest cgi)
Converts CGI HTTP POST/GET request to aQueryRequest
.boolean
equals(java.lang.Object other)
void
forEachFacet(java.util.function.Consumer<FacetRequest> consumer)
Consume all requestedFacetRequests
withconsumer
.void
forEachField(java.util.function.Consumer<FieldRequest> consumer)
Consume allFieldRequest
s withconsumer
.int
getAcronymBoost()
Get the boost to apply to expanded acronyms.java.lang.String
getAcronymDictionaryName()
Get the name of the dictionary to use for acronym expansion.QueryRequest.AcronymsMode
getAcronymsMode()
Get the mode for expanding acronyms.java.util.List<Query>
getBoostQueries()
Get all boost queries applied to this QueryRequest.java.util.Date
getCenterTime()
java.util.List<FacetFilter>
getFacetFilters()
Get theFacetFilter
s that will be used to filter the result set.int
getFacetFinderCount()
Get the maximum number of facets FacetFinder will add to this QueryRequest.QueryRequest.FacetFinderMode
getFacetFinderMode()
Get the mode for FacetFinder.java.util.List<FacetRequest>
getFacets()
Get the facets requested for this QueryRequest.int
getFacetSampleSize()
Get the sample size for sample based facets.FieldCollapse
getFieldCollapse()
Get the field collapsing specification for this QueryRequest.int
getFieldRequestCount()
Get the number of requested fields, or-1
for Select *.FieldRequest[]
getFieldRequests()
Get the fields requested for this query (ornull
for SELECT *).FieldExpression[]
getFields()
Deprecated.usegetFieldRequests()
orforEachField(Consumer)
to get the requested fields instead.java.util.List<Query>
getFilters()
Get all filters for this query.Point
getGeoLocation()
Get the default center point for geo distance calculations.java.lang.String
getGeoLocationField()
Get the default field to use for geo distance calculations.FieldExpression[]
getGroupBy()
Get the Group By specification.FieldExpression
getGroupByFilter()
Experimental: Get the filter to apply to groups.HighlightMode
getHighlightMode()
Get theHighlightMode
for annotating scopes in highlighted text.java.lang.String
getHighlightScope()
Get the name of the scope used to annotate matching phrases in highlighted text.JoinFacetMode
getJoinFacetMode()
Gets the facet mode for joined documents.JoinRollupMode
getJoinRollupMode()
Gets the rollup mode for joined documents.java.util.Locale
getLocale()
Get the Locale for this query.int
getMaxResubmits()
Gets the maximum number of resubmits allowed for this QueryRequest.long
getOffset()
Get the offset into the result set for the first returned document.AttivioPrincipal
getPrincipal()
Query
getQuery()
Get the search query for this QueryRequest.java.lang.String
getQueryLanguage()
Get the query language forgetQueryString()
.java.lang.String
getQueryString()
Get the original query string for the search query for this QueryRequest.java.util.List<RelevancyFeature>
getRelevancyFeatures()
Get the features to use for relevancy.RelevancyModel
getRelevancyModel()
Gets the relevancy model to use for this query.java.lang.String
getRelevancyModelName()
Deprecated.java.lang.String[]
getRelevancyModelNames()
Get the names of the requested relevancy models.int
getResubmits()
Get the number of times this QueryRequest has been resubmitted.FieldExpression
getRowFilter()
Experimental: Get the filter to apply to rows.long
getRows()
Get the requested number of documents to return for this request.java.lang.String
getSchemaName()
Get the name of the schema to use for processing this QueryRequest.java.util.List<FieldExpression>
getScoreFunctions()
Gets the scoring functions to use for this QueryRequest.int
getSearchDepth()
Get the number of rows deep the search should go.java.lang.String
getSearchProfile()
Get the name of the search profile to apply to the query request.long
getSeed()
Get the seed used for any random functions over this query request.java.util.List<Sort>
getSort()
Get the sorting specification for this QueryRequest.java.lang.String
getSpellCheckDictionaryName()
Get the name of the dictionary to use for spellcheck.int
getSpellCheckExpandSize()
Gets the number of expanded suggestions that will be added for misspelled terms.QueryRequest.SpellCheckMode
getSpellCheckMode()
Get the mode for spell checking.java.lang.String
getStopwordDictionaryName()
Get the name of the dictionary to use for stopword removal.QueryRequest.StopwordsMode
getStopwordsMode()
Get the mode for stopword removal.int
getSynonymBoost()
Get the boost to apply to expanded synonyms.java.lang.String
getSynonymDictionaryName()
Get the name of the dictionary to use for synonym expansion.QueryRequest.SynonymsMode
getSynonymsMode()
Get the mode for synonym expansion.java.util.TimeZone
getTimeZone()
Get the TimeZone for this query.java.util.Set<java.lang.String>
getZones()
Get the names of the zones to apply this query to.boolean
hasFacets()
true
if this QueryRequest is requesting any Facets.int
hashCode()
void
incrementResubmits()
Increment the number of times this QueryRequest has been resubmitted.boolean
isCacheable()
Get if the results for this QueryRequest are cacheable.boolean
isDebug()
Get if debugging information is desired for this request.boolean
isHighlight()
true
if highlighting should be performed for configured fields.boolean
isIncludeMetadataInResponse()
True if the response should be removed of all non data elements such as message history and the query request.boolean
isPartialResults()
Gets if partial result is allowed for this request.boolean
isPreview()
Get if preview mode is enabled for this query.boolean
removeFacet(FacetRequest facet)
Remove the specified FacetRequest.boolean
removeFacet(java.lang.String facetRequestName)
Remove the specified FacetRequest by name.void
setAcronymBoost(int acronymBoost)
Set the boost to apply to expanded acronyms.void
setAcronymDictionaryName(java.lang.String value)
Set the name of the dictionary to use for acronym expansion.void
setAcronymsMode(QueryRequest.AcronymsMode acronymsMode)
Set the mode for expanding acronyms.void
setBoostQueries(java.util.List<Query> value)
Set the boost queries.void
setCacheable(boolean value)
Set if the results for this QueryRequest are cacheable.void
setCenterTime(java.util.Date value)
void
setDebug(boolean value)
Set if debugging information is desired for this request.void
setFacetFilters(java.util.List<FacetFilter> facetFilters)
Set theFacetFilter
s to "drill down" on.void
setFacetFinderCount(int facetFinderCount)
Set the maximum number of facets FacetFinder will add to this QueryRequest.void
setFacetFinderMode(QueryRequest.FacetFinderMode facetFinderMode)
Set the mode for FacetFinder.void
setFacets(FacetRequest... facets)
Set theFacetRequest
s for this query.void
setFacets(java.lang.String... facets)
Set the fields to request facets for.void
setFacets(java.util.Collection<FacetRequest> facets)
Set theFacetRequest
s for this queryvoid
setFacetSampleSize(int value)
Set the sample size for sample based facets.void
setFieldCollapse(FieldCollapse value)
Set the field collapsing specification for this QueryRequest.void
setFields(FieldExpression... newFields)
Set the fields to return for this QueryRequest.void
setFields(FieldRequest... value)
Set the fields to return for this QueryRequest.void
setFields(java.lang.String... newFields)
Set the names of the fields that should be returned in the response.void
setFields(java.util.Collection<FieldExpression> value)
Set the fields to return for this QueryRequest.void
setFilters(java.util.List<Query> filters)
Set the filterQuery
s to apply to this QueryRequest.void
setGroupBy(FieldExpression... columns)
Set the Group By specification.void
setGroupBy(java.lang.String... columns)
Set the Group By specification.void
setGroupBy(java.util.List<FieldExpression> columns)
Set the Group By specification.void
setGroupByFilter(FieldExpression value)
Experimental: Set the filter to apply to groups.void
setGroupByFilter(java.lang.String value)
Experimental: Set the filter to apply to groups.void
setHighlight(boolean value)
Set if highlighting should be performed for configured fields.void
setHighlightMode(HighlightMode value)
Set theHighlightMode
for annotating scopes in highlighted text.void
setHighlightScope(java.lang.String value)
Set the name of the scope used to annotate matching phrases in highlighted text.void
setIncludeMetadataInResponse(boolean includeMetadataInResponse)
void
setJoinFacetMode(JoinFacetMode value)
Sets the facet mode for joined documents.void
setJoinRollupMode(JoinRollupMode value)
Sets the rollup mode for joined documents.void
setLocale(java.util.Locale l)
Set the Locale for this query.void
setMaxResubmits(int value)
Sets the maximum number of resubmits allowed for this QueryRequest.void
setOffset(long value)
Set the offset into the result set for the first returned document.void
setPartialResults(boolean value)
Gets if partial result is allowed for this request.void
setPreview(boolean value)
Set if preview mode is enabled for this query.void
setPrincipal(AttivioPrincipal principal)
void
setProperties(java.util.Map<java.lang.String,java.lang.String[]> parameters)
void
setProperty(java.lang.String name, java.lang.Object value)
Sets an arbitrary property for the message.void
setQuery(Query query)
Set the search query for this QueryRequest.void
setQuery(java.lang.String query)
Set the search query for this QueryRequest.void
setQuery(java.lang.String queryString, java.lang.String language)
Set the search query for this QueryRequest.void
setQueryString(java.lang.String query)
Set the search query for this QueryRequest.void
setRelevancyFeatures(RelevancyFeature... value)
Set the features to use for relevancy.void
setRelevancyFeatures(java.util.List<RelevancyFeature> value)
Set the features to use for relevancy.void
setRelevancyModel(RelevancyModel model)
Sets the relevancy model to use for this query.void
setRelevancyModelName(java.lang.String name)
Deprecated.UsesetRelevancyModelNames(String...)
instead.void
setRelevancyModelNames(java.lang.String... value)
Set the names of the requested relevancy models.void
setRelevancyModelNames(java.util.List<java.lang.String> value)
Set the names of the requested relevancy models.void
setResubmits(int rs)
Set the number of times this QueryRequest has been resubmitted.void
setRowFilter(FieldExpression value)
Experimental: Set the filter to apply to rows.void
setRowFilter(java.lang.String value)
Experimental: Set the filter to apply to rows.void
setRows(long value)
Set the requested number of documents to return in theQueryResponse
for this request.void
setSchemaName(java.lang.String schemaName)
Set the name of the schema to use for processing this QueryRequest.void
setScoreFunctions(java.util.List<FieldExpression> value)
Sets the scoring functions to use for this QueryRequest.void
setSearchDepth(int value)
Set the number of rows deep the search should go.void
setSearchProfile(java.lang.String name)
Set the name of the search profile to apply to the query request.void
setSeed(long value)
Set the seed used for any random functions over this query request.void
setSort(Sort... value)
void
setSort(java.util.List<Sort> value)
Set the sorting specification for this QueryRequest.void
setSpellCheckDictionaryName(java.lang.String value)
Set the name of the dictionary to use for spellcheck.void
setSpellCheckExpandSize(int value)
Sets the number of expanded suggestions that will be added for misspelled terms.void
setSpellCheckMode(QueryRequest.SpellCheckMode spellCheckMode)
Set the mode for spell checking.void
setStopwordDictionaryName(java.lang.String value)
Set the name of the dictionary to use for stopword removal.void
setStopwordsMode(QueryRequest.StopwordsMode stopwordsMode)
Set the mode for stopword removal.void
setSynonymBoost(int synonymBoost)
Set the boost to apply to expanded synonyms.void
setSynonymDictionaryName(java.lang.String value)
Set the name of the dictionary to use for synonym expansion.void
setSynonymsMode(QueryRequest.SynonymsMode synonymsMode)
Set the mode for synonym expansion.void
setTimeZone(java.util.TimeZone value)
Set the TimeZone for this query.void
setZones(java.lang.String... value)
Set the names of the zones to apply this query to.void
setZones(java.util.Set<java.lang.String> value)
Set the names of the zones to apply this query to.CgiRequest
toCgiRequest()
Creates a CgiRequest from a QueryRequest.java.lang.String
toCgiString()
Returns a parseable CGI string representation of the requestprotected java.lang.StringBuilder
toString(java.lang.StringBuilder buffer)
Append the string form of this request tobuffer
.-
Methods inherited from class com.attivio.sdk.esb.AbstractPlatformMessage
addMessageHistory, addMessageHistory, getClientId, getEstimatedSize, getMessageHistory, getMessageId, getMetadata, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getWorkflowQueue, getWorkflowQueue, hasProperty, isRedelivered, removeProperty, removeWorkflowQueue, setClientId, setMessageId, setRedelivered, setWorkflowQueue, setWorkflowQueue, toMessageString, toString, toString, toString, toString, toString, toString, toString, toString, toString
-
-
-
-
Field Detail
-
DEFAULT_ROWS
public static final long DEFAULT_ROWS
Default value forgetRows()
.- See Also:
- Constant Field Values
-
DEFAULT_OFFSET
public static final long DEFAULT_OFFSET
Default value forgetOffset()
.- See Also:
- Constant Field Values
-
DEFAULT_DEBUG
public static final boolean DEFAULT_DEBUG
Default value forisDebug()
.- See Also:
- Constant Field Values
-
DEFAULT_PREVIEW
public static final boolean DEFAULT_PREVIEW
Default value forisPreview()
.- See Also:
- Constant Field Values
-
DEFAULT_INCLUDE_METADATA_IN_RESPONSE
public static final boolean DEFAULT_INCLUDE_METADATA_IN_RESPONSE
Default value forisDebug()
.- See Also:
- Constant Field Values
-
DEFAULT_SEARCH_DEPTH
public static final int DEFAULT_SEARCH_DEPTH
Default value forgetSearchDepth()
.- See Also:
- Constant Field Values
-
DEFAULT_STOPWORDS_MODE
public static final QueryRequest.StopwordsMode DEFAULT_STOPWORDS_MODE
Default value forgetStopwordsMode()
.
-
DEFAULT_SYNONYM_MODE
public static final QueryRequest.SynonymsMode DEFAULT_SYNONYM_MODE
Default value forgetSynonymsMode()
.
-
DEFAULT_SYNONYM_BOOST
public static final int DEFAULT_SYNONYM_BOOST
Default value forgetSynonymBoost()
.- See Also:
- Constant Field Values
-
DEFAULT_ACRONYM_MODE
public static final QueryRequest.AcronymsMode DEFAULT_ACRONYM_MODE
Default value forgetAcronymsMode()
.
-
DEFAULT_ACRONYM_BOOST
public static final int DEFAULT_ACRONYM_BOOST
Default value forgetAcronymBoost()
.- See Also:
- Constant Field Values
-
DEFAULT_FACET_SAMPLE_SIZE
public static final int DEFAULT_FACET_SAMPLE_SIZE
Default value forgetFacetSampleSize()
.- See Also:
- Constant Field Values
-
DEFAULT_LOCALE
public static final java.util.Locale DEFAULT_LOCALE
Default value forgetLocale()
.
-
DEFAULT_HIGHLIGHT
public static final boolean DEFAULT_HIGHLIGHT
Default value forisHighlight()
.- See Also:
- Constant Field Values
-
DEFAULT_HIGHLIGHT_MODE
public static final HighlightMode DEFAULT_HIGHLIGHT_MODE
Default value forgetHighlightMode()
.
-
DEFAULT_HIGHLIGHT_SCOPE
public static final java.lang.String DEFAULT_HIGHLIGHT_SCOPE
Default value forgetHighlightScope()
.- See Also:
- Constant Field Values
-
DEFAULT_CACHEABLE
public static final boolean DEFAULT_CACHEABLE
Default value forisCacheable()
.- See Also:
- Constant Field Values
-
DEFAULT_SPELLCHECK_MODE
public static final QueryRequest.SpellCheckMode DEFAULT_SPELLCHECK_MODE
Default value forgetSpellCheckMode()
.
-
DEFAULT_SPELLCHECK_EXPAND_SIZE
public static final int DEFAULT_SPELLCHECK_EXPAND_SIZE
Default value forgetSpellCheckExpandSize()
.- See Also:
- Constant Field Values
-
DEFAULT_MAX_RESUBMITS
public static final int DEFAULT_MAX_RESUBMITS
Default value forgetMaxResubmits()
.- See Also:
- Constant Field Values
-
DEFAULT_RESUBMITS
public static final int DEFAULT_RESUBMITS
Initial value forgetResubmits()
.- See Also:
- Constant Field Values
-
DEFAULT_PARTIAL_RESULTS
public static final boolean DEFAULT_PARTIAL_RESULTS
Default value forisPartialResults()
- See Also:
- Constant Field Values
-
DEFAULT_SEED
public static final long DEFAULT_SEED
Default value forgetSeed()
.- See Also:
- Constant Field Values
-
DEFAULT_FACET_FINDER_MODE
public static final QueryRequest.FacetFinderMode DEFAULT_FACET_FINDER_MODE
Default value forgetFacetFinderMode()
.
-
DEFAULT_FACET_FINDER_COUNT
public static final int DEFAULT_FACET_FINDER_COUNT
Default value forgetFacetFinderCount()
.- See Also:
- Constant Field Values
-
DEFAULT_JOIN_ROLLUP_MODE
public static final JoinRollupMode DEFAULT_JOIN_ROLLUP_MODE
Default value forgetJoinRollupMode()
.
-
DEFAULT_JOIN_FACET_MODE
public static final JoinFacetMode DEFAULT_JOIN_FACET_MODE
Default value forgetJoinFacetMode()
.
-
SPELLCHECK_MODE_DEFAULT
public static final java.lang.String SPELLCHECK_MODE_DEFAULT
Default spellcheck mode.
-
genericQueryParameters
protected final transient java.util.List<QueryParameters.Parameter> genericQueryParameters
-
propertyAlreadySet
protected final java.util.Set<java.lang.String> propertyAlreadySet
-
-
Constructor Detail
-
QueryRequest
public QueryRequest()
The default constructor. No query is set.
-
QueryRequest
public QueryRequest(java.lang.String query)
Constructor with a string query.- See Also:
QueryString
-
QueryRequest
public QueryRequest(java.lang.String query, java.lang.String language)
Constructor with a query string and query language.- See Also:
QueryString
-
-
Method Detail
-
isDebug
public boolean isDebug()
Get if debugging information is desired for this request.
-
setDebug
public void setDebug(boolean value)
Set if debugging information is desired for this request.
-
getRows
public long getRows()
Get the requested number of documents to return for this request.
-
setRows
public void setRows(long value)
Set the requested number of documents to return in theQueryResponse
for this request.Only values < Integer.MAX_VALUE are supported.
-
getOffset
public long getOffset()
Get the offset into the result set for the first returned document.
-
setOffset
public void setOffset(long value)
Set the offset into the result set for the first returned document.Currently only values < Integer.MAX_VALUE are supported.
-
isIncludeMetadataInResponse
public boolean isIncludeMetadataInResponse()
True if the response should be removed of all non data elements such as message history and the query request.
-
setIncludeMetadataInResponse
public void setIncludeMetadataInResponse(boolean includeMetadataInResponse)
-
isPreview
public boolean isPreview()
Get if preview mode is enabled for this query.Preview mode will use unpublished resources (if possible) when processing/evaluating the query.
-
setPreview
public void setPreview(boolean value)
Set if preview mode is enabled for this query.Preview mode will use unpublished resources (if possible) when processing/evaluating the query.
-
getSearchProfile
public java.lang.String getSearchProfile()
Get the name of the search profile to apply to the query request.
-
setSearchProfile
public void setSearchProfile(java.lang.String name)
Set the name of the search profile to apply to the query request.
-
getQuery
public Query getQuery()
Get the search query for this QueryRequest.
-
setQuery
public void setQuery(Query query)
Set the search query for this QueryRequest.
-
setQuery
public void setQuery(java.lang.String query)
Set the search query for this QueryRequest.- See Also:
QueryString
-
setQueryString
public void setQueryString(java.lang.String query)
Set the search query for this QueryRequest.- See Also:
QueryString
-
setQuery
public void setQuery(java.lang.String queryString, java.lang.String language)
Set the search query for this QueryRequest.- See Also:
QueryString
-
getQueryString
public java.lang.String getQueryString()
Get the original query string for the search query for this QueryRequest.- See Also:
Query.getQueryString()
-
getQueryLanguage
public java.lang.String getQueryLanguage()
Get the query language forgetQueryString()
.- See Also:
Query.getQueryLanguage()
-
getSearchDepth
public int getSearchDepth()
Get the number of rows deep the search should go. When using Field Collapsing, increasing this setting increases the accuracy of Field Collapsing across multiple partitions by giving the collapsing algorithm more rows to collapse. There are no other scenarios where this parameter has any effect.By default, the search depth will be
getOffset()
+getRows()
NOTE: this does not affect the number of documents returned.
-
setSearchDepth
public void setSearchDepth(int value)
Set the number of rows deep the search should go. When using Field Collapsing, increasing this setting increases the accuracy of Field Collapsing across multiple partitions by giving the collapsing algorithm more rows to collapse. There are no other scenarios where this parameter has any effect.By default, the search depth will be
getOffset()
+getRows()
NOTE: this does not affect the number of documents returned.
-
addBoostQuery
public void addBoostQuery(Query boost)
Add a boost query.NOTE: Boost queries are only used for ranking, not matching records.
-
setBoostQueries
public void setBoostQueries(java.util.List<Query> value)
Set the boost queries.
-
getBoostQueries
public java.util.List<Query> getBoostQueries()
Get all boost queries applied to this QueryRequest.
-
getFilters
public java.util.List<Query> getFilters()
Get all filters for this query.
-
setFilters
public void setFilters(java.util.List<Query> filters)
Set the filterQuery
s to apply to this QueryRequest.
-
addFilter
public void addFilter(java.lang.String exp)
Add a filter query to this QueryRequest.
-
addFilter
public void addFilter(java.lang.String exp, java.lang.String langSpec)
Add a filter query to this QueryRequest.- Parameters:
exp
- the query to filter onlangSpec
- the query language forexp
-
getFacetFilters
public java.util.List<FacetFilter> getFacetFilters()
Get theFacetFilter
s that will be used to filter the result set.
-
setFacetFilters
public void setFacetFilters(java.util.List<FacetFilter> facetFilters)
Set theFacetFilter
s to "drill down" on.
-
addFacetFilter
public void addFacetFilter(FacetFilter bucket)
Adds a filter to this QueryRequest that will "drill down" onbucket
.
-
getZones
public java.util.Set<java.lang.String> getZones()
Get the names of the zones to apply this query to.
-
setZones
public void setZones(java.util.Set<java.lang.String> value)
Set the names of the zones to apply this query to.
-
setZones
public void setZones(java.lang.String... value)
Set the names of the zones to apply this query to.
-
isCacheable
public boolean isCacheable()
Get if the results for this QueryRequest are cacheable.
-
setCacheable
public void setCacheable(boolean value)
Set if the results for this QueryRequest are cacheable.
-
getSeed
public long getSeed()
Get the seed used for any random functions over this query request.This seed will be used when a "random" sort is applied to this QueryRequest.
-
setSeed
public void setSeed(long value)
Set the seed used for any random functions over this query request.This seed will be used when a "random" sort is applied to this QueryRequest.
-
getJoinRollupMode
public JoinRollupMode getJoinRollupMode()
Gets the rollup mode for joined documents.This setting is only relevant if the search query is a JOIN query.
-
setJoinRollupMode
public void setJoinRollupMode(JoinRollupMode value)
Sets the rollup mode for joined documents.This setting is only relevant if the search query is a JOIN query.
-
getJoinFacetMode
public JoinFacetMode getJoinFacetMode()
Gets the facet mode for joined documents.This setting is only relevant if the search query contains JOIN queries.
-
setJoinFacetMode
public void setJoinFacetMode(JoinFacetMode value)
Sets the facet mode for joined documents.This setting is only relevant if the search query contains JOIN queries.
-
getRelevancyModel
public RelevancyModel getRelevancyModel()
Gets the relevancy model to use for this query.
-
setRelevancyModel
public void setRelevancyModel(RelevancyModel model)
Sets the relevancy model to use for this query.
-
getRelevancyModelNames
public java.lang.String[] getRelevancyModelNames()
Get the names of the requested relevancy models.The first relevancy model that exists will be applied during query processing.
-
setRelevancyModelNames
public void setRelevancyModelNames(java.util.List<java.lang.String> value)
Set the names of the requested relevancy models.The first relevancy model that exists will be applied during query processing.
-
setRelevancyModelNames
public void setRelevancyModelNames(java.lang.String... value)
Set the names of the requested relevancy models.The first relevancy model that exists will be applied during query processing.
-
getRelevancyModelName
@Deprecated public java.lang.String getRelevancyModelName()
Deprecated.Gets the name of the relevancy model to use for this query.
-
setRelevancyModelName
@Deprecated public void setRelevancyModelName(java.lang.String name)
Deprecated.UsesetRelevancyModelNames(String...)
instead.Sets the name of the relevancy model to use for this query.With default configurations, this can be set to "noop" in order to apply an empty relevancy model.
-
isPartialResults
public boolean isPartialResults()
Gets if partial result is allowed for this request.
-
setPartialResults
public void setPartialResults(boolean value)
Gets if partial result is allowed for this request.
-
getRelevancyFeatures
public java.util.List<RelevancyFeature> getRelevancyFeatures()
Get the features to use for relevancy.
-
setRelevancyFeatures
public void setRelevancyFeatures(java.util.List<RelevancyFeature> value)
Set the features to use for relevancy.
-
setRelevancyFeatures
public void setRelevancyFeatures(RelevancyFeature... value)
Set the features to use for relevancy.
-
getScoreFunctions
public java.util.List<FieldExpression> getScoreFunctions()
Gets the scoring functions to use for this QueryRequest.
-
setScoreFunctions
public void setScoreFunctions(java.util.List<FieldExpression> value)
Sets the scoring functions to use for this QueryRequest.
-
addScoreFunction
public void addScoreFunction(java.lang.String value)
Add a scoring function to this QueryRequest.
-
addScoreFunction
public void addScoreFunction(java.lang.String... value)
Add a scoring function to this QueryRequest.
-
addScoreFunction
public void addScoreFunction(FieldExpression value)
Add a scoring function to this QueryRequest.
-
addScoreFunction
public void addScoreFunction(FieldExpression... value)
Add a scoring function to this QueryRequest.
-
getMaxResubmits
public int getMaxResubmits()
Gets the maximum number of resubmits allowed for this QueryRequest.
-
setMaxResubmits
public void setMaxResubmits(int value)
Sets the maximum number of resubmits allowed for this QueryRequest.
-
getResubmits
public int getResubmits()
Get the number of times this QueryRequest has been resubmitted.
-
setResubmits
public void setResubmits(int rs)
Set the number of times this QueryRequest has been resubmitted.NOTE: this method should only be used by QueryResponse Transformers that will perform resubmit logic.
-
incrementResubmits
public void incrementResubmits()
Increment the number of times this QueryRequest has been resubmitted.NOTE: this method should only be used by QueryResponse Transformers that will perform resubmit logic.
-
getSort
public java.util.List<Sort> getSort()
Get the sorting specification for this QueryRequest.If
null
or "empty", then sorting will be done by score descending.
-
setSort
public void setSort(Sort... value)
-
setSort
public void setSort(java.util.List<Sort> value)
Set the sorting specification for this QueryRequest.If
null
or "empty", then sorting will be done by score descending.
-
addSort
public void addSort(java.lang.String field, Sort.SortOrder order)
-
addSort
public void addSort(FieldExpression field, Sort.SortOrder order)
-
getFacetSampleSize
public int getFacetSampleSize()
Get the sample size for sample based facets.
-
setFacetSampleSize
public void setFacetSampleSize(int value)
Set the sample size for sample based facets.
-
hasFacets
public boolean hasFacets()
true
if this QueryRequest is requesting any Facets.
-
getFacets
public java.util.List<FacetRequest> getFacets()
Get the facets requested for this QueryRequest.
-
forEachFacet
public void forEachFacet(java.util.function.Consumer<FacetRequest> consumer)
Consume all requestedFacetRequests
withconsumer
.
-
setFacets
public void setFacets(java.lang.String... facets)
Set the fields to request facets for.NOTE: overwrites any
FacetRequest
s already set.
-
setFacets
public void setFacets(FacetRequest... facets)
Set theFacetRequest
s for this query.NOTE: overwrites any FacetRequests already set
-
setFacets
public void setFacets(java.util.Collection<FacetRequest> facets)
Set theFacetRequest
s for this queryNOTE: overwrites any
FacetRequest
s already set.
-
addFacet
public void addFacet(FacetRequest... f)
Adds allFacetRequest
s to this QueryRequest.
-
addFacetField
public void addFacetField(java.lang.String... fieldNames)
Adds aFacetRequest
for all specified fields.
-
removeFacet
public boolean removeFacet(FacetRequest facet)
Remove the specified FacetRequest.
-
removeFacet
public boolean removeFacet(java.lang.String facetRequestName)
Remove the specified FacetRequest by name.
-
isHighlight
public boolean isHighlight()
true
if highlighting should be performed for configured fields.
-
setHighlight
public void setHighlight(boolean value)
Set if highlighting should be performed for configured fields.
-
getHighlightMode
public HighlightMode getHighlightMode()
Get theHighlightMode
for annotating scopes in highlighted text.
-
setHighlightMode
public void setHighlightMode(HighlightMode value)
Set theHighlightMode
for annotating scopes in highlighted text.
-
getHighlightScope
public java.lang.String getHighlightScope()
Get the name of the scope used to annotate matching phrases in highlighted text.
-
setHighlightScope
public void setHighlightScope(java.lang.String value)
Set the name of the scope used to annotate matching phrases in highlighted text.
-
getFields
@Deprecated public FieldExpression[] getFields()
Deprecated.usegetFieldRequests()
orforEachField(Consumer)
to get the requested fields instead.Get the fields requested for this query (ornull
for SELECT *).DEPRECATION NOTE: in a future release, this method will be updated to return FieldRequest[] instead.
-
getFieldRequestCount
public int getFieldRequestCount()
Get the number of requested fields, or-1
for Select *.
-
getFieldRequests
public FieldRequest[] getFieldRequests()
Get the fields requested for this query (ornull
for SELECT *).
-
forEachField
public void forEachField(java.util.function.Consumer<FieldRequest> consumer)
Consume allFieldRequest
s withconsumer
.
-
setFields
public void setFields(FieldRequest... value)
Set the fields to return for this QueryRequest.
-
setFields
public void setFields(java.util.Collection<FieldExpression> value)
Set the fields to return for this QueryRequest.
-
setFields
public void setFields(FieldExpression... newFields)
Set the fields to return for this QueryRequest.
-
setFields
public void setFields(java.lang.String... newFields)
Set the names of the fields that should be returned in the response. (ornull
for SELECT *).NOTE: if isHighlight() returns true, then any field in
fields
that is configured in the schema for highlighting will be returned highlighted according to schema configuration. UseaddField(FieldExpression)
to addFieldExpression
s configured as desired.
-
addField
public QueryRequest addField(FieldRequest field)
Add aFieldRequest
to return for this QueryRequest.
-
addField
public QueryRequest addField(java.lang.String field)
Add a field to return in the response documents.
-
addField
public QueryRequest addField(FieldExpression field, java.lang.String name)
Add a field to return in the response documents.
-
addField
public QueryRequest addField(FieldExpression field)
Add a FieldExpression to return for this QueryRequest.
-
getFieldCollapse
public FieldCollapse getFieldCollapse()
Get the field collapsing specification for this QueryRequest.
-
setFieldCollapse
public void setFieldCollapse(FieldCollapse value)
Set the field collapsing specification for this QueryRequest.
-
getGroupByFilter
public FieldExpression getGroupByFilter()
Experimental: Get the filter to apply to groups.This allows applying a HAVING filter to the result set. This filter requires that a
groupby
has been applied to the query.
-
setGroupByFilter
public void setGroupByFilter(FieldExpression value)
Experimental: Set the filter to apply to groups.
-
setGroupByFilter
public void setGroupByFilter(java.lang.String value)
Experimental: Set the filter to apply to groups.
-
getRowFilter
public FieldExpression getRowFilter()
Experimental: Get the filter to apply to rows.This allows applying a field expression based WHERE filter to the result set.
-
setRowFilter
public void setRowFilter(FieldExpression value)
Experimental: Set the filter to apply to rows.
-
setRowFilter
public void setRowFilter(java.lang.String value)
Experimental: Set the filter to apply to rows.
-
getGroupBy
public FieldExpression[] getGroupBy()
Get the Group By specification.
-
setGroupBy
public void setGroupBy(java.lang.String... columns)
Set the Group By specification.
-
setGroupBy
public void setGroupBy(FieldExpression... columns)
Set the Group By specification.
-
setGroupBy
public void setGroupBy(java.util.List<FieldExpression> columns)
Set the Group By specification.
-
getSpellCheckMode
public QueryRequest.SpellCheckMode getSpellCheckMode()
Get the mode for spell checking.
-
setSpellCheckMode
public void setSpellCheckMode(QueryRequest.SpellCheckMode spellCheckMode)
Set the mode for spell checking.
-
getSpellCheckDictionaryName
public java.lang.String getSpellCheckDictionaryName()
Get the name of the dictionary to use for spellcheck.
-
setSpellCheckDictionaryName
public void setSpellCheckDictionaryName(java.lang.String value)
Set the name of the dictionary to use for spellcheck.
-
getSpellCheckExpandSize
public int getSpellCheckExpandSize()
Gets the number of expanded suggestions that will be added for misspelled terms.NOTE: this setting will only be used if the AUTO_EXPAND spell check mode is used.
-
setSpellCheckExpandSize
public void setSpellCheckExpandSize(int value)
Sets the number of expanded suggestions that will be added for misspelled terms.NOTE: this setting will only be used if the AUTO_EXPAND spell check mode is used.
-
getAcronymsMode
public QueryRequest.AcronymsMode getAcronymsMode()
Get the mode for expanding acronyms.
-
setAcronymsMode
public void setAcronymsMode(QueryRequest.AcronymsMode acronymsMode)
Set the mode for expanding acronyms.
-
getAcronymDictionaryName
public java.lang.String getAcronymDictionaryName()
Get the name of the dictionary to use for acronym expansion.
-
setAcronymDictionaryName
public void setAcronymDictionaryName(java.lang.String value)
Set the name of the dictionary to use for acronym expansion.
-
getAcronymBoost
public int getAcronymBoost()
Get the boost to apply to expanded acronyms.
-
setAcronymBoost
public void setAcronymBoost(int acronymBoost)
Set the boost to apply to expanded acronyms.This can be used to reduce or nullify the boost contributed by acronyms in order to utilize acronym expansion for increasing recall.
-
getSynonymsMode
public QueryRequest.SynonymsMode getSynonymsMode()
Get the mode for synonym expansion.
-
setSynonymsMode
public void setSynonymsMode(QueryRequest.SynonymsMode synonymsMode)
Set the mode for synonym expansion.
-
getSynonymDictionaryName
public java.lang.String getSynonymDictionaryName()
Get the name of the dictionary to use for synonym expansion.
-
setSynonymDictionaryName
public void setSynonymDictionaryName(java.lang.String value)
Set the name of the dictionary to use for synonym expansion.
-
getSynonymBoost
public int getSynonymBoost()
Get the boost to apply to expanded synonyms.
-
setSynonymBoost
public void setSynonymBoost(int synonymBoost)
Set the boost to apply to expanded synonyms.This can be used to reduce or nullify the boost contributed by synonyms in order to utilize synonym expansion for increasing recall.
-
getStopwordsMode
public QueryRequest.StopwordsMode getStopwordsMode()
Get the mode for stopword removal.
-
setStopwordsMode
public void setStopwordsMode(QueryRequest.StopwordsMode stopwordsMode)
Set the mode for stopword removal.
-
getStopwordDictionaryName
public java.lang.String getStopwordDictionaryName()
Get the name of the dictionary to use for stopword removal.
-
setStopwordDictionaryName
public void setStopwordDictionaryName(java.lang.String value)
Set the name of the dictionary to use for stopword removal.
-
getFacetFinderMode
public QueryRequest.FacetFinderMode getFacetFinderMode()
Get the mode for FacetFinder.
-
setFacetFinderMode
public void setFacetFinderMode(QueryRequest.FacetFinderMode facetFinderMode)
Set the mode for FacetFinder.
-
getFacetFinderCount
public int getFacetFinderCount()
Get the maximum number of facets FacetFinder will add to this QueryRequest.
-
setFacetFinderCount
public void setFacetFinderCount(int facetFinderCount)
Set the maximum number of facets FacetFinder will add to this QueryRequest.
-
getLocale
public java.util.Locale getLocale()
Get the Locale for this query.- Specified by:
getLocale
in interfaceLocaleAware
-
setLocale
public void setLocale(java.util.Locale l)
Set the Locale for this query.In general a correct value for the Locale is required in order to perform proper query side linguistics.
- Specified by:
setLocale
in interfaceLocaleAware
-
getCenterTime
public java.util.Date getCenterTime()
- Since:
- 5.5.0.3 Get the center time used for evaluating date expressions.
This center time will be used as the "current time" for all evaluated field expressions (such as
CurrentTime
)
-
setCenterTime
public void setCenterTime(java.util.Date value)
- Since:
- 5.5.0.3 Set the center time used for evaluating date expressions.
This center time will be used as the "current time" for all evaluated field expressions (such as
CurrentTime
)
-
getTimeZone
public java.util.TimeZone getTimeZone()
Get the TimeZone for this query.
-
setTimeZone
public void setTimeZone(java.util.TimeZone value)
Set the TimeZone for this query.
-
getSchemaName
public java.lang.String getSchemaName()
Get the name of the schema to use for processing this QueryRequest.
-
setSchemaName
public void setSchemaName(java.lang.String schemaName)
Set the name of the schema to use for processing this QueryRequest.
-
toString
protected java.lang.StringBuilder toString(java.lang.StringBuilder buffer)
Append the string form of this request tobuffer
.- Overrides:
toString
in classAbstractPlatformMessage
-
toCgiRequest
public CgiRequest toCgiRequest()
Creates a CgiRequest from a QueryRequest. This is the inverse operation of theQueryRequest
create method.Not all queries and filters are guaranteed to have equivalent parseable string representations; this method cannot guarantee an equivalent CGI Request for such cases.
-
toCgiString
public java.lang.String toCgiString()
Returns a parseable CGI string representation of the request
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractPlatformMessage
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classAbstractPlatformMessage
-
clone
public QueryRequest clone()
Clones the object and resets message ID to -1. Clones a message. The message ID is not cloned.- Specified by:
clone
in interfacePlatformMessage
- Overrides:
clone
in classAbstractPlatformMessage
- Returns:
- the cloned index message
-
getGeoLocationField
public java.lang.String getGeoLocationField()
Get the default field to use for geo distance calculations.
-
getGeoLocation
public Point getGeoLocation()
Get the default center point for geo distance calculations.
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.String[]> parameters) throws AttivioException
- Throws:
AttivioException
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)
Description copied from class:AbstractPlatformMessage
Sets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.- Specified by:
setProperty
in interfacePlatformMessage
- Overrides:
setProperty
in classAbstractPlatformMessage
- Parameters:
name
- the keyvalue
- the value
-
create
public static QueryRequest create(CgiRequest cgi) throws AttivioException
Converts CGI HTTP POST/GET request to aQueryRequest
.Parameter Type(1) Default Multi(2) Description Example clientid String optional no Client ID. clientid=1234 workflows String required no Comma separated list of workflows to send the query through. workflows=defaultQuery,searcher,defaultResponse q String required no Query String q=cat q.type String advanced
no Query Language used. [ simple
|advanced
]q.type=simple filter String optional yes Filter Query
to apply.filter=position:POLYGON((5.0, 9.0), (5.0, 11.0), (6.0, 11.0), (6.0, 9.0)) q.filter String optional yes Query Filter. q.filter=color:black q.filter.type String simple
no Deprecated. Query Language used by filter. [ simple
|advanced
]q.filter.type=advanced q.boost String optional yes Query Boost Expression q.boost=foo q.boost.type String advanced
no Query Language used by query boosts. [ simple
|advanced
]q.boost.type=advanced q.maxResubmits unsigned 0 no Maximum number of times query can be resubmitted. q.maxResubmits=5 hits unsigned 10L no Number of records to return. hits=100 offset unsigned 0L no Retrieve number of records starting from offset. offset=20 searchDepth unsigned 0 no Number of rows deep to search. searchDepth=100 searchProfile String optional no Name of the search profile to use. searchProfile=mySearchProfile debug boolean false no Enable debugging information. true or false debug=true includeMetadataInResponse boolean false no Include non essential/data (from the index) information in the response. true or false debug=true partialResults boolean false no Enable/Disable partial results from distributed indexes partialResults=false abc.enabled boolean false no Whether or not the query should be annotated as an Attivio Business Center query. abc.enabled=true cacheable boolean true no Is the result cacheable? cacheable=false seed long 0L no Seed to use for random number generation (random sorting, etc) seed=38293843928 locale String en no 2 letter iso code for locale. locale=en timezone String UTC no Time Zone for date interpretation. timezone=EST schema String optional no Name of the schema to use for query processing schema=default relevancymodelname String optional no Comma separated list of relevancy model names to use for ranking documents by relevancy. The first relevancy model specified that exists will be used. relevancyModelName=myTestModel highlight boolean false no highlight results based on schema configuration highlight=true fields String optional yes Comma separated list of field expressions to return with response documents. fields=*,geodistance(position, 72.3, 71.5, degrees, miles) AS distance sort String optional no Comma separated list of fields to sort by [ ASC | DESC ] sort=title:asc,body:desc score.function String optional yes Score function to boost matching documents with score.function=product(sum(5.5, boostfield), boostfactorfield) collapse String optional no Field collapsing specification. Example: collapse=cat(mode=2D, rows=10) facet String optional yes Comma separated list of discrete facet definitions. Example: facet=title(mincutoff=3,sortby=count),category(maxnumbuckets=100) facet.filter String optional no Facet bucket to use for filtering results. Example: facet.filter=department:"Sales Engineering" rangeFacet String optional yes Comma separated list of range facet definitions. rangeFacet=size(range=int("label-1", 0, 5),range=int("label-2", 5, 10)) rangeFacet.filter String optional no Range Facet bucket to use for filtering results. Example: rangeFacet.filter=size:[0 TO 50] schemaFacet String optional yes Schema facet definition schemaFacet=schema(schemaFields=true) facet.ff enum OFF
no Facet finder mode. [ OFF
|RESULTS
]facet.ff=RESULTS facet.ffcount unsigned 3 no Limit the number of facets returned by Facet Finder service facet.ffcount=4 join.rollup enum AGGREGATE
no Join children aggregation mode. [ AGGREGATE
|TREE
]join.rollup=TREE join.facet enum DISTINCT
no Join children facet aggregation mode. [ DISTINCT
|FULL
]join.facet=FULL l.stopwords.mode enum OFF
no Enable stop word removal. [ OFF
|REMOVE
|BLOCK
]l.stopwords.mode=off l.acronym.dictionary String optional no Name of the acronym dictionary to use. l.acronym.dictionary=myAcronymDictionary l.acronyms.mode enum OFF
no Enable acronym expansion. [ OFF
|ON
|AUTO
]l.acronyms.mode=off l.acronyms.boost int 100 no Set boost for expanded acronyms. l.acronyms.boost=25 l.synonym.dictionary String optional no Name of the synonym dictionary to use. l.synonym.dictionary=mySynonymDictionary l.synonyms.mode enum OFF
no Enable synonyms. [ OFF
|ON
|AUTO
]l.synoynms.mode=off l.synonymBoost int 100 no set synonym boost or down weight. l.synoynmBoost=25 l.spell.mode enum OFF
no Spelling Correction Mode. [ OFF
|SUGGEST
|AUTOCORRECT
|AUTOEXPAND
]l.spell.mode=SUGGEST l.spellexpandsize unsigned 2 no Sets the number of expanded suggestions that will be added for misspelled terms. l.spellexpandsize=2 geo.field String optional no The default field to use for geo search. geo.field=position geo.latitude double optional no The default latitude of center point for geo search. geo.latitude=0 geo.longitude double optional no The default longitude of center point for geo search. geo.longitude=0 geo.distanceUnits enum KILOMETERS
no The units distances are specified. [ KILOMETERS
|METERS
|MILES
|YARDS
|NAUTICAL_MILES
]geo.distanceUnits=MILES any unknown parameter String optional optional All unknown cgi parameters are set as message properties via setProperty(String, Object)
. These properties can then be used by custom transformers or accessed in cgi query logs for reporting purposes.myProp=myValue (1) The Type column indicates the data type expected for values of the query parameter. If values are specified that are not of this type, the default value will be used instead, unless the parameter is optional, in which case the parameter will be ignored.
(2) The Multi column indicates whether or not the HTTP query parameter can be specified multiple times. For example, since the q.filter parameter is Multi=yes, you can specify it mulitiple times like so
q.filter=filter1&q.filter=filter2
.
- Parameters:
cgi
- - CGI request object- Throws:
AttivioException
-
setPrincipal
public void setPrincipal(AttivioPrincipal principal)
-
getPrincipal
public AttivioPrincipal getPrincipal()
- Returns:
- attivio principal on request, or null if none exists
-
-