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
QueryResponsewill be returned as the result. Use aSearchClientfor 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).FieldExpressions 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).RangeFacetRequestcan be used to return buckets for specified ranges of values.FilterBasedFacetRequestcan be used to get a bucket count for any arbitraryQueryover 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 classQueryRequest.AcronymsModeModes for Acronym Expansion.static classQueryRequest.FacetFinderModeModes for FacetFinder.static classQueryRequest.SpellCheckModeModes for spell checking.static classQueryRequest.StopwordsModeModes for Stopword removalstatic classQueryRequest.SynonymsModeModes 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 voidaddBoostQuery(Query boost)Add a boost query.voidaddFacet(FacetRequest... f)Adds allFacetRequests to this QueryRequest.voidaddFacetField(java.lang.String... fieldNames)Adds aFacetRequestfor all specified fields.voidaddFacetFilter(FacetFilter bucket)Adds a filter to this QueryRequest that will "drill down" onbucket.QueryRequestaddField(FieldExpression field)Add a FieldExpression to return for this QueryRequest.QueryRequestaddField(FieldExpression field, java.lang.String name)Add a field to return in the response documents.QueryRequestaddField(FieldRequest field)Add aFieldRequestto return for this QueryRequest.QueryRequestaddField(java.lang.String field)Add a field to return in the response documents.voidaddFilter(Query f)Add a filterQueryto this QueryRequest.voidaddFilter(java.lang.String exp)Add a filter query to this QueryRequest.voidaddFilter(java.lang.String exp, java.lang.String langSpec)Add a filter query to this QueryRequest.voidaddScoreFunction(FieldExpression value)Add a scoring function to this QueryRequest.voidaddScoreFunction(FieldExpression... value)Add a scoring function to this QueryRequest.voidaddScoreFunction(java.lang.String value)Add a scoring function to this QueryRequest.voidaddScoreFunction(java.lang.String... value)Add a scoring function to this QueryRequest.voidaddSort(FieldExpression field, Sort.SortOrder order)voidaddSort(Sort value)Add aSortspecifier to this QueryRequest.voidaddSort(java.lang.String field, Sort.SortOrder order)QueryRequestclone()Clones the object and resets message ID to -1.static QueryRequestcreate(CgiRequest cgi)Converts CGI HTTP POST/GET request to aQueryRequest.booleanequals(java.lang.Object other)voidforEachFacet(java.util.function.Consumer<FacetRequest> consumer)Consume all requestedFacetRequestswithconsumer.voidforEachField(java.util.function.Consumer<FieldRequest> consumer)Consume allFieldRequests withconsumer.intgetAcronymBoost()Get the boost to apply to expanded acronyms.java.lang.StringgetAcronymDictionaryName()Get the name of the dictionary to use for acronym expansion.QueryRequest.AcronymsModegetAcronymsMode()Get the mode for expanding acronyms.java.util.List<Query>getBoostQueries()Get all boost queries applied to this QueryRequest.java.util.DategetCenterTime()java.util.List<FacetFilter>getFacetFilters()Get theFacetFilters that will be used to filter the result set.intgetFacetFinderCount()Get the maximum number of facets FacetFinder will add to this QueryRequest.QueryRequest.FacetFinderModegetFacetFinderMode()Get the mode for FacetFinder.java.util.List<FacetRequest>getFacets()Get the facets requested for this QueryRequest.intgetFacetSampleSize()Get the sample size for sample based facets.FieldCollapsegetFieldCollapse()Get the field collapsing specification for this QueryRequest.intgetFieldRequestCount()Get the number of requested fields, or-1for Select *.FieldRequest[]getFieldRequests()Get the fields requested for this query (ornullfor SELECT *).FieldExpression[]getFields()Deprecated.usegetFieldRequests()orforEachField(Consumer)to get the requested fields instead.java.util.List<Query>getFilters()Get all filters for this query.PointgetGeoLocation()Get the default center point for geo distance calculations.java.lang.StringgetGeoLocationField()Get the default field to use for geo distance calculations.FieldExpression[]getGroupBy()Get the Group By specification.FieldExpressiongetGroupByFilter()Experimental: Get the filter to apply to groups.HighlightModegetHighlightMode()Get theHighlightModefor annotating scopes in highlighted text.java.lang.StringgetHighlightScope()Get the name of the scope used to annotate matching phrases in highlighted text.JoinFacetModegetJoinFacetMode()Gets the facet mode for joined documents.JoinRollupModegetJoinRollupMode()Gets the rollup mode for joined documents.java.util.LocalegetLocale()Get the Locale for this query.intgetMaxResubmits()Gets the maximum number of resubmits allowed for this QueryRequest.longgetOffset()Get the offset into the result set for the first returned document.AttivioPrincipalgetPrincipal()QuerygetQuery()Get the search query for this QueryRequest.java.lang.StringgetQueryLanguage()Get the query language forgetQueryString().java.lang.StringgetQueryString()Get the original query string for the search query for this QueryRequest.java.util.List<RelevancyFeature>getRelevancyFeatures()Get the features to use for relevancy.RelevancyModelgetRelevancyModel()Gets the relevancy model to use for this query.java.lang.StringgetRelevancyModelName()Deprecated.java.lang.String[]getRelevancyModelNames()Get the names of the requested relevancy models.intgetResubmits()Get the number of times this QueryRequest has been resubmitted.FieldExpressiongetRowFilter()Experimental: Get the filter to apply to rows.longgetRows()Get the requested number of documents to return for this request.java.lang.StringgetSchemaName()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.intgetSearchDepth()Get the number of rows deep the search should go.java.lang.StringgetSearchProfile()Get the name of the search profile to apply to the query request.longgetSeed()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.StringgetSpellCheckDictionaryName()Get the name of the dictionary to use for spellcheck.intgetSpellCheckExpandSize()Gets the number of expanded suggestions that will be added for misspelled terms.QueryRequest.SpellCheckModegetSpellCheckMode()Get the mode for spell checking.java.lang.StringgetStopwordDictionaryName()Get the name of the dictionary to use for stopword removal.QueryRequest.StopwordsModegetStopwordsMode()Get the mode for stopword removal.intgetSynonymBoost()Get the boost to apply to expanded synonyms.java.lang.StringgetSynonymDictionaryName()Get the name of the dictionary to use for synonym expansion.QueryRequest.SynonymsModegetSynonymsMode()Get the mode for synonym expansion.java.util.TimeZonegetTimeZone()Get the TimeZone for this query.java.util.Set<java.lang.String>getZones()Get the names of the zones to apply this query to.booleanhasFacets()trueif this QueryRequest is requesting any Facets.inthashCode()voidincrementResubmits()Increment the number of times this QueryRequest has been resubmitted.booleanisCacheable()Get if the results for this QueryRequest are cacheable.booleanisDebug()Get if debugging information is desired for this request.booleanisHighlight()trueif highlighting should be performed for configured fields.booleanisIncludeMetadataInResponse()True if the response should be removed of all non data elements such as message history and the query request.booleanisPartialResults()Gets if partial result is allowed for this request.booleanisPreview()Get if preview mode is enabled for this query.booleanremoveFacet(FacetRequest facet)Remove the specified FacetRequest.booleanremoveFacet(java.lang.String facetRequestName)Remove the specified FacetRequest by name.voidsetAcronymBoost(int acronymBoost)Set the boost to apply to expanded acronyms.voidsetAcronymDictionaryName(java.lang.String value)Set the name of the dictionary to use for acronym expansion.voidsetAcronymsMode(QueryRequest.AcronymsMode acronymsMode)Set the mode for expanding acronyms.voidsetBoostQueries(java.util.List<Query> value)Set the boost queries.voidsetCacheable(boolean value)Set if the results for this QueryRequest are cacheable.voidsetCenterTime(java.util.Date value)voidsetDebug(boolean value)Set if debugging information is desired for this request.voidsetFacetFilters(java.util.List<FacetFilter> facetFilters)Set theFacetFilters to "drill down" on.voidsetFacetFinderCount(int facetFinderCount)Set the maximum number of facets FacetFinder will add to this QueryRequest.voidsetFacetFinderMode(QueryRequest.FacetFinderMode facetFinderMode)Set the mode for FacetFinder.voidsetFacets(FacetRequest... facets)Set theFacetRequests for this query.voidsetFacets(java.lang.String... facets)Set the fields to request facets for.voidsetFacets(java.util.Collection<FacetRequest> facets)Set theFacetRequests for this queryvoidsetFacetSampleSize(int value)Set the sample size for sample based facets.voidsetFieldCollapse(FieldCollapse value)Set the field collapsing specification for this QueryRequest.voidsetFields(FieldExpression... newFields)Set the fields to return for this QueryRequest.voidsetFields(FieldRequest... value)Set the fields to return for this QueryRequest.voidsetFields(java.lang.String... newFields)Set the names of the fields that should be returned in the response.voidsetFields(java.util.Collection<FieldExpression> value)Set the fields to return for this QueryRequest.voidsetFilters(java.util.List<Query> filters)Set the filterQuerys to apply to this QueryRequest.voidsetGroupBy(FieldExpression... columns)Set the Group By specification.voidsetGroupBy(java.lang.String... columns)Set the Group By specification.voidsetGroupBy(java.util.List<FieldExpression> columns)Set the Group By specification.voidsetGroupByFilter(FieldExpression value)Experimental: Set the filter to apply to groups.voidsetGroupByFilter(java.lang.String value)Experimental: Set the filter to apply to groups.voidsetHighlight(boolean value)Set if highlighting should be performed for configured fields.voidsetHighlightMode(HighlightMode value)Set theHighlightModefor annotating scopes in highlighted text.voidsetHighlightScope(java.lang.String value)Set the name of the scope used to annotate matching phrases in highlighted text.voidsetIncludeMetadataInResponse(boolean includeMetadataInResponse)voidsetJoinFacetMode(JoinFacetMode value)Sets the facet mode for joined documents.voidsetJoinRollupMode(JoinRollupMode value)Sets the rollup mode for joined documents.voidsetLocale(java.util.Locale l)Set the Locale for this query.voidsetMaxResubmits(int value)Sets the maximum number of resubmits allowed for this QueryRequest.voidsetOffset(long value)Set the offset into the result set for the first returned document.voidsetPartialResults(boolean value)Gets if partial result is allowed for this request.voidsetPreview(boolean value)Set if preview mode is enabled for this query.voidsetPrincipal(AttivioPrincipal principal)voidsetProperties(java.util.Map<java.lang.String,java.lang.String[]> parameters)voidsetProperty(java.lang.String name, java.lang.Object value)Sets an arbitrary property for the message.voidsetQuery(Query query)Set the search query for this QueryRequest.voidsetQuery(java.lang.String query)Set the search query for this QueryRequest.voidsetQuery(java.lang.String queryString, java.lang.String language)Set the search query for this QueryRequest.voidsetQueryString(java.lang.String query)Set the search query for this QueryRequest.voidsetRelevancyFeatures(RelevancyFeature... value)Set the features to use for relevancy.voidsetRelevancyFeatures(java.util.List<RelevancyFeature> value)Set the features to use for relevancy.voidsetRelevancyModel(RelevancyModel model)Sets the relevancy model to use for this query.voidsetRelevancyModelName(java.lang.String name)Deprecated.UsesetRelevancyModelNames(String...)instead.voidsetRelevancyModelNames(java.lang.String... value)Set the names of the requested relevancy models.voidsetRelevancyModelNames(java.util.List<java.lang.String> value)Set the names of the requested relevancy models.voidsetResubmits(int rs)Set the number of times this QueryRequest has been resubmitted.voidsetRowFilter(FieldExpression value)Experimental: Set the filter to apply to rows.voidsetRowFilter(java.lang.String value)Experimental: Set the filter to apply to rows.voidsetRows(long value)Set the requested number of documents to return in theQueryResponsefor this request.voidsetSchemaName(java.lang.String schemaName)Set the name of the schema to use for processing this QueryRequest.voidsetScoreFunctions(java.util.List<FieldExpression> value)Sets the scoring functions to use for this QueryRequest.voidsetSearchDepth(int value)Set the number of rows deep the search should go.voidsetSearchProfile(java.lang.String name)Set the name of the search profile to apply to the query request.voidsetSeed(long value)Set the seed used for any random functions over this query request.voidsetSort(Sort... value)voidsetSort(java.util.List<Sort> value)Set the sorting specification for this QueryRequest.voidsetSpellCheckDictionaryName(java.lang.String value)Set the name of the dictionary to use for spellcheck.voidsetSpellCheckExpandSize(int value)Sets the number of expanded suggestions that will be added for misspelled terms.voidsetSpellCheckMode(QueryRequest.SpellCheckMode spellCheckMode)Set the mode for spell checking.voidsetStopwordDictionaryName(java.lang.String value)Set the name of the dictionary to use for stopword removal.voidsetStopwordsMode(QueryRequest.StopwordsMode stopwordsMode)Set the mode for stopword removal.voidsetSynonymBoost(int synonymBoost)Set the boost to apply to expanded synonyms.voidsetSynonymDictionaryName(java.lang.String value)Set the name of the dictionary to use for synonym expansion.voidsetSynonymsMode(QueryRequest.SynonymsMode synonymsMode)Set the mode for synonym expansion.voidsetTimeZone(java.util.TimeZone value)Set the TimeZone for this query.voidsetZones(java.lang.String... value)Set the names of the zones to apply this query to.voidsetZones(java.util.Set<java.lang.String> value)Set the names of the zones to apply this query to.CgiRequesttoCgiRequest()Creates a CgiRequest from a QueryRequest.java.lang.StringtoCgiString()Returns a parseable CGI string representation of the requestprotected java.lang.StringBuildertoString(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 theQueryResponsefor 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 filterQuerys 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 theFacetFilters that will be used to filter the result set.
-
setFacetFilters
public void setFacetFilters(java.util.List<FacetFilter> facetFilters)
Set theFacetFilters 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
nullor "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
nullor "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()
trueif 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 requestedFacetRequestswithconsumer.
-
setFacets
public void setFacets(java.lang.String... facets)
Set the fields to request facets for.NOTE: overwrites any
FacetRequests already set.
-
setFacets
public void setFacets(FacetRequest... facets)
Set theFacetRequests for this query.NOTE: overwrites any FacetRequests already set
-
setFacets
public void setFacets(java.util.Collection<FacetRequest> facets)
Set theFacetRequests for this queryNOTE: overwrites any
FacetRequests already set.
-
addFacet
public void addFacet(FacetRequest... f)
Adds allFacetRequests to this QueryRequest.
-
addFacetField
public void addFacetField(java.lang.String... fieldNames)
Adds aFacetRequestfor 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()
trueif 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 theHighlightModefor annotating scopes in highlighted text.
-
setHighlightMode
public void setHighlightMode(HighlightMode value)
Set theHighlightModefor 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 (ornullfor 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-1for Select *.
-
getFieldRequests
public FieldRequest[] getFieldRequests()
Get the fields requested for this query (ornullfor SELECT *).
-
forEachField
public void forEachField(java.util.function.Consumer<FieldRequest> consumer)
Consume allFieldRequests 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. (ornullfor SELECT *).NOTE: if isHighlight() returns true, then any field in
fieldsthat is configured in the schema for highlighting will be returned highlighted according to schema configuration. UseaddField(FieldExpression)to addFieldExpressions configured as desired.
-
addField
public QueryRequest addField(FieldRequest field)
Add aFieldRequestto 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
groupbyhas 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:
getLocalein 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:
setLocalein 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:
toStringin classAbstractPlatformMessage
-
toCgiRequest
public CgiRequest toCgiRequest()
Creates a CgiRequest from a QueryRequest. This is the inverse operation of theQueryRequestcreate 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:
hashCodein classAbstractPlatformMessage
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin 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:
clonein interfacePlatformMessage- Overrides:
clonein 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:AbstractPlatformMessageSets an arbitrary property for the message. Some transformations of messages may result in the value being converted to a String.- Specified by:
setPropertyin interfacePlatformMessage- Overrides:
setPropertyin 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 advancedno Query Language used. [ simple|advanced]q.type=simple filter String optional yes Filter Queryto 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 simpleno 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 advancedno 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 OFFno 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 AGGREGATEno Join children aggregation mode. [ AGGREGATE|TREE]join.rollup=TREE join.facet enum DISTINCTno Join children facet aggregation mode. [ DISTINCT|FULL]join.facet=FULL l.stopwords.mode enum OFFno 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 OFFno 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 OFFno 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 OFFno 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 KILOMETERSno 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
-
-