Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.1.6)

E21908-05

oracle.ecsf
Interface QueryMetaData

All Superinterfaces:
java.io.Serializable

public interface QueryMetaData
extends java.io.Serializable

QueryMetaData defines the input meta data of a search query. The user can specify the query string, search groups, page size, facet selections, etc, that are associated with a particular query. This object is passed in as a parameter to the runQuery() method of SearchCtrl class.


Method Summary
 void addFilter(java.lang.String fieldName, java.lang.String filterValue, java.lang.String dataType, java.lang.String filterOp)
          Sets the filters to be used for this advanced search query
 void addTag(java.lang.String tag)
          Add a tag to the query.
 void clearFacetPaths()
          Clears all facet paths.
 void clearTags()
          Clears the tags added to the query.
 QueryMetaData copy()
          Creates a copy of this query meta data.
 void enableFacets(boolean enable)
          Sets whether the facet functionality is enabled.
 int getCurrentPage()
          Returns the page number retrieved for this query
 FacetPath[] getFacetPaths()
          Returns the facet paths used for this query
 java.util.List<FieldFilter> getFilters()
          Returns the a list of FieldFilter objects hashed by field name.
 java.lang.String getLanguage()
          Returns the language for the query.
 int getMaxFacetValues()
          Gets the maximum number of facet values each facet should return.
 int getPageSize()
          Returns the page size used for this query
 java.lang.String getQueryString()
          Returns the query string for this query
 SearchGroup[] getSearchGroups()
          Returns the search groups used for this query
 java.lang.String getSESSearchControls()
          Returns SES search controls used for this query
 java.lang.String getSOName()
          Returns the search object name used to filter the query
 java.util.List<java.lang.String> getTags()
          Returns a list of tags added to the query.
 boolean isFacetsEnabled()
          Returns whether facets are enabled or not.
 boolean isMLSEnabled()
          Returns flag indicating if the query enables MLS, if enabled, the query would only return results of the query lanugage.
 void removeAllFilters()
          Removes all the filters added for this queryMetaData
 void removeFacetValue(java.lang.String rootFacetName)
          Removes the leaf facet's selected value
 void selectFacetValue(java.lang.String rootFacetName, java.lang.String value)
          Selects a facet value for the leaf facet of a root facet.
 void setCurrentPage(int page)
          Sets the page number to be retrieved for this query
 void setFacetPaths(FacetPath[] paths)
          Sets the facet paths to be used for this query
 void setLanguage(java.lang.String language)
          Sets the language for the query, this value overrides the user's default language setting
 void setMaxFacetValues(int maxFacetValues)
          Sets the maximum number of facet values each facet should return.
 void setMLSEnabled(boolean enableMLS)
          Sets the flag to filter the results by query langauge.
 void setPageSize(int size)
          Sets the page size to be used for this query
 void setQueryString(java.lang.String queryStr)
          Sets the query string for this query
 void setSearchGroups(SearchGroup[] sgs)
          Sets the search groups used for this query
 void setSESSearchControls(java.lang.String sesSearchControls)
          Sets the SES search controls to be used for this query
 void setSOName(java.lang.String soName)
          Sets the search object that the query will be filtered by
 

Method Detail

setQueryString

void setQueryString(java.lang.String queryStr)
Sets the query string for this query

Parameters:
queryStr - query string

getQueryString

java.lang.String getQueryString()
Returns the query string for this query

Returns:
String query string

setSearchGroups

void setSearchGroups(SearchGroup[] sgs)
Sets the search groups used for this query

Parameters:
sgs - array of SearchGroup objects

getSearchGroups

SearchGroup[] getSearchGroups()
Returns the search groups used for this query

Returns:
array of SearchGroup objects

setSOName

void setSOName(java.lang.String soName)
Sets the search object that the query will be filtered by

Parameters:
soName - - the search object name to filter query by Set to null to clear.

getSOName

java.lang.String getSOName()
Returns the search object name used to filter the query

Returns:
soName

setPageSize

void setPageSize(int size)
Sets the page size to be used for this query

Parameters:
size - the page size.

getPageSize

int getPageSize()
Returns the page size used for this query

Returns:
int size

setCurrentPage

void setCurrentPage(int page)
Sets the page number to be retrieved for this query

Parameters:
page - page position for this request.

getCurrentPage

int getCurrentPage()
Returns the page number retrieved for this query

Returns:
int page

addFilter

void addFilter(java.lang.String fieldName,
               java.lang.String filterValue,
               java.lang.String dataType,
               java.lang.String filterOp)
Sets the filters to be used for this advanced search query

Parameters:
fieldName - the field name
filterValue - the filter value
dataType - the data type of the filter
filterOp - the filter operator of the filter. The value is engine dependent.

getFilters

java.util.List<FieldFilter> getFilters()
Returns the a list of FieldFilter objects hashed by field name. Filters are used for this advanced search queries.

Returns:
a list of FieldFilter objects

removeAllFilters

void removeAllFilters()
Removes all the filters added for this queryMetaData


clearFacetPaths

void clearFacetPaths()
Clears all facet paths.


selectFacetValue

void selectFacetValue(java.lang.String rootFacetName,
                      java.lang.String value)
Selects a facet value for the leaf facet of a root facet.

Parameters:
rootFacetName - - the name of the root facet.
value - - the value selected for the current leaf facet.

removeFacetValue

void removeFacetValue(java.lang.String rootFacetName)
Removes the leaf facet's selected value

Parameters:
rootFacetName - - the name of the root facet.

setFacetPaths

void setFacetPaths(FacetPath[] paths)
Sets the facet paths to be used for this query

Parameters:
paths - the array of FacetPath objects

getFacetPaths

FacetPath[] getFacetPaths()
Returns the facet paths used for this query

Returns:
array of FacetPath objects

setMaxFacetValues

void setMaxFacetValues(int maxFacetValues)
Sets the maximum number of facet values each facet should return.

Parameters:
maxFacetValues - - max number of values for each facet. -1 for all values (default).

getMaxFacetValues

int getMaxFacetValues()
Gets the maximum number of facet values each facet should return.

Returns:
- max number of values for each facet. -1 for all values (default).

enableFacets

void enableFacets(boolean enable)
Sets whether the facet functionality is enabled. (default is true)

Parameters:
enable - - boolean

isFacetsEnabled

boolean isFacetsEnabled()
Returns whether facets are enabled or not.

Returns:
boolean

setSESSearchControls

void setSESSearchControls(java.lang.String sesSearchControls)
Sets the SES search controls to be used for this query

Parameters:
sesSearchControls - XML constructor for search control. This API only applicable to SES.

getSESSearchControls

java.lang.String getSESSearchControls()
Returns SES search controls used for this query

Returns:
String

addTag

void addTag(java.lang.String tag)
Add a tag to the query. This would force a search to be filtered by tags. Multiple tags can be added by calling this method. All tags must exist for a document to return.

Parameters:
tag - the tag value to be filtered on.

getTags

java.util.List<java.lang.String> getTags()
Returns a list of tags added to the query.

Returns:
A list of tags.

clearTags

void clearTags()
Clears the tags added to the query.


getLanguage

java.lang.String getLanguage()
Returns the language for the query. If null, the user's default language setting will be used

Returns:
ISO 639-1 standard language code

setLanguage

void setLanguage(java.lang.String language)
Sets the language for the query, this value overrides the user's default language setting

Parameters:
ISO - 639-1 standard language code

isMLSEnabled

boolean isMLSEnabled()
Returns flag indicating if the query enables MLS, if enabled, the query would only return results of the query lanugage. Default value is false so that query should return hits of all languages.

Returns:
if MLS is enabled.

setMLSEnabled

void setMLSEnabled(boolean enableMLS)
Sets the flag to filter the results by query langauge.

Parameters:
enableMLS - if true langugage filter will be enabled.

copy

QueryMetaData copy()
Creates a copy of this query meta data. Copies facetpaths, searchgroups, and soname for now, which is needed in HitsMetaData.getFacets(). Internal use only.

Returns:
QueryMetaData

Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.1.6)

E21908-05

Copyright © 2012 Oracle. All rights reserved.