lumis.search
Class SearchQuery

Package class diagram package SearchQuery
java.lang.Object
  extended by lumis.search.SearchQuery
Direct Known Subclasses:
LuceneSearchQuery

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class SearchQuery
extends Object

Represents search criteria used to find matching information by a search engine.

Since:
4.0.4

Constructor Summary
SearchQuery()
          Constructs a SearchQuery object with neither user query and attributes.
SearchQuery(String query)
          Constructs a SearchQuery object with the given user query and no attributes.
SearchQuery(String query, SearchAttributes attributes)
          Constructs a SearchQuery object with the given user query and attributes.
 
Method Summary
 SearchAttributes getAttributes()
          Returns the query's attributes, that define additional information to be passed to the search engine.
 ISearchQueryFilter getControlFilter()
          Returns a query filter to be applied to the search.
 String getControlQuery()
          Returns the control query, which is the system-defined portion of the query, usually containing criteria related to some metadata indexed with the content (e.g.
 int getMaxRows()
          Returns the maximum number of hits to be returned by the query execution.
 int getStartAt()
          Returns the number of the first hit to be returned by the query execution.
 String getUserQuery()
          Returns the user query, which is the user-defined portion of the query, usually entered by the final user using front-end interfaces.
 void setAttributes(SearchAttributes attributes)
          Sets the query's attributes.
 void setControlFilter(ISearchQueryFilter controlFilter)
          Sets the query filter to be applied to the search.
 void setControlQuery(String controlQuery)
          Sets the control query.
 void setMaxRows(int maxRows)
          Sets the maximum number of hits.
 void setStartAt(int startAt)
          Sets the number of the first hit.
 void setUserQuery(String query)
          Sets the user query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchQuery

public SearchQuery()
Constructs a SearchQuery object with neither user query and attributes.

Since:
4.0.4

SearchQuery

public SearchQuery(String query)
Constructs a SearchQuery object with the given user query and no attributes.

Parameters:
query - {@link #getUserQuery() user query
Since:
4.0.4

SearchQuery

public SearchQuery(String query,
                   SearchAttributes attributes)
Constructs a SearchQuery object with the given user query and attributes.

Parameters:
query - user query
attributes - attributes
Since:
4.0.4
Method Detail

getAttributes

public SearchAttributes getAttributes()
Returns the query's attributes, that define additional information to be passed to the search engine.

Returns:
the query's attributes
Since:
4.0.4

setAttributes

public void setAttributes(SearchAttributes attributes)
Sets the query's attributes.

Parameters:
attributes - the query's attributes
Since:
4.0.4

getUserQuery

public String getUserQuery()
Returns the user query, which is the user-defined portion of the query, usually entered by the final user using front-end interfaces.

The search engines can and usually perform a tokenization in the user query in the same way they do in the contents during the indexing process.

Returns:
the user query
Since:
4.0.4
See Also:
lumis.search

setUserQuery

public void setUserQuery(String query)
Sets the user query.

Parameters:
query - the user query
Since:
4.0.4

getControlQuery

public String getControlQuery()
Returns the control query, which is the system-defined portion of the query, usually containing criteria related to some metadata indexed with the content (e.g. service instance identifier).

The search engines must not perform a tokenization in the control query, because it usually consists in criteria for non-intelligible information (such as GUIDs).

Returns:
the control query
Since:
4.0.4
See Also:
getControlFilter()

setControlQuery

public void setControlQuery(String controlQuery)
Sets the control query.

Parameters:
controlQuery - the control query
Since:
4.0.4
See Also:
setControlFilter(ISearchQueryFilter)

getMaxRows

public int getMaxRows()
Returns the maximum number of hits to be returned by the query execution.

Usually this setting is used to paginate the search results.

Returns:
the maximum number of hits
Since:
4.0.4

setMaxRows

public void setMaxRows(int maxRows)
Sets the maximum number of hits.

Parameters:
maxRows - the maximum number of hits
Since:
4.0.4

getStartAt

public int getStartAt()
Returns the number of the first hit to be returned by the query execution.

Usually this setting is used to paginate the search results.

Returns:
the number of the first hit
Since:
4.0.4

setStartAt

public void setStartAt(int startAt)
Sets the number of the first hit.

Parameters:
startAt - the number of the first hit
Since:
4.0.4

getControlFilter

public ISearchQueryFilter getControlFilter()
Returns a query filter to be applied to the search.

Returns:
the query filter, or null if none was specified.
Since:
4.2.2
See Also:
lumis.search.filter, getControlQuery()

setControlFilter

public void setControlFilter(ISearchQueryFilter controlFilter)
Sets the query filter to be applied to the search.

Parameters:
the - query filter.
Since:
4.2.2
See Also:
lumis.search.filter, setControlQuery(String)


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.