com.gisgraphy.domain.geoloc.service.fulltextsearch
Class FulltextQuery
java.lang.Object
com.gisgraphy.domain.geoloc.service.AbstractGisQuery
com.gisgraphy.domain.geoloc.service.fulltextsearch.FulltextQuery
@Configurable
@Component
public class FulltextQuery
- extends AbstractGisQuery
A fulltext Query
- Author:
- David Masclet
- See Also:
Pagination
,
Output
,
IFullTextSearchEngine
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
QUERY_MAX_LENGTH
public static final int QUERY_MAX_LENGTH
- See Also:
- Constant Field Values
logger
public static final org.slf4j.Logger logger
- The logger
FulltextQuery
public FulltextQuery(javax.servlet.http.HttpServletRequest req)
- Parameters:
req
- an HttpServletRequest to construct a FulltextQuery
FulltextQuery
public FulltextQuery(java.lang.String query,
Pagination pagination,
Output output,
java.lang.Class<? extends GisFeature> placeType,
java.lang.String countryCode)
- Parameters:
query
- The text to query, if the query is a number zipcode will
be searchedpagination
- The pagination specification, if null : use defaultoutput
- Output
The output specification , if null : use
defaultplaceType
- the type of gis to search , if null : search for all place
type.countryCode
- Limit the search to the specified countryCode. If null or
wrong it would be ignored (no check is done)
- Throws:
An
- IllegalArgumentException
if the query is null or
empty string
FulltextQuery
public FulltextQuery(java.lang.String query)
- Parameters:
query
- The text to search
- Throws:
An
- IllegalArgumentException
if the query is null or
an empty string
getQuery
public java.lang.String getQuery()
- Returns:
- The searched text for this FullTextQuery
limitToCountryCode
public FulltextQuery limitToCountryCode(java.lang.String countryCode)
- Parameters:
countryCode
- the countryCode to set. Limit the query to the specified
countrycode, if the country code is null, it will be
ignored. If null or invalid, it will be ignored (no check
is done)
getCountryCode
public java.lang.String getCountryCode()
- Returns:
- the countryCode of the country that the query will be restricted
to
isOutputIndented
public boolean isOutputIndented()
- Returns:
- Wether the output will be indented
- See Also:
Output.isIndented()
getPlaceType
public java.lang.Class<? extends GisFeature> getPlaceType()
- Returns:
- the placeType : it limits the search to an object of a specifict
class
withPlaceType
public FulltextQuery withPlaceType(java.lang.Class<? extends GisFeature> placeType)
- Parameters:
placeType
- The placeType to set, if null, search for all placetype
- Returns:
- The current query to chain methods
toString
public java.lang.String toString()
- Overrides:
toString
in class AbstractGisQuery
withSpellChecking
public FulltextQuery withSpellChecking()
- Enable the spellchecking for this query
- Returns:
- The current query to chain methods
withoutSpellChecking
public FulltextQuery withoutSpellChecking()
- Disable the spellchecking for this query
- Returns:
- The current query to chain methods
hasSpellChecking
public boolean hasSpellChecking()
- Wether the spellchecking is enabled for this query
- Returns:
- The current query to chain methods
toQueryString
public java.lang.String toQueryString()
- Returns:
- A query string for the specified parameter (starting with '?')
the name of the parameters are defined in
Constants
parameterize
public org.apache.solr.common.params.ModifiableSolrParams parameterize()
- Returns:
- A Representation of all the needed parameters
getMaxLimitResult
public int getMaxLimitResult()
- Overrides:
getMaxLimitResult
in class AbstractGisQuery
- Returns:
- the maximum number of results that the query should return
hashCode
public int hashCode()
- Overrides:
hashCode
in class AbstractGisQuery
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractGisQuery
Copyright © 2010. All Rights Reserved.