java.lang.Object | |
↳ | com.carto.search.SearchRequest |
A search request description. Contains various search filters,
including geometry proximity test, regular expression test for all attributes
and a custom SQL-like search filter.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SearchRequest()
Constructs an empty SearchRequest.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | delete() | ||||||||||
boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
String |
getFilterExpression()
Returns the string based search expression.
| ||||||||||
Geometry |
getGeometry()
Returns the geometry used for proximity search.
| ||||||||||
Projection |
getProjection()
Returns the projection to use for search geometry.
| ||||||||||
String |
getRegexFilter()
Returns the regular expression used to search all the fields.
| ||||||||||
float |
getSearchRadius()
Returns the search radius for proximity search (in meters).
| ||||||||||
int |
hashCode()
Returns the hash value of this object.
| ||||||||||
void |
setFilterExpression(String expr)
Sets the string based search expression.
| ||||||||||
void |
setGeometry(Geometry geometry)
Sets the geometry used for proximity search.
| ||||||||||
void |
setProjection(Projection projection)
Sets the projection to use for search geometry.
| ||||||||||
void |
setRegexFilter(String regex)
Sets the regular expression used to search all the fields.
| ||||||||||
void |
setSearchRadius(float radius)
Sets the search radius for proximity search (in meters).
| ||||||||||
String |
toString()
Creates a string representation of this request object, useful for logging.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs an empty SearchRequest.
Checks if this object is equal to the specified object.
obj | The reference object. |
---|
Returns the string based search expression.
If empty, then search expression is not used.
Returns the geometry used for proximity search.
Returns the projection to use for search geometry.
Returns the regular expression used to search all the fields.
If empty, then the regular expression is not used.
Returns the search radius for proximity search (in meters). The default is 0.
Returns the hash value of this object.
Sets the string based search expression.
A various conditions based on the fields and geometry can be used.
For example, "name='X' OR (name='Y' AND gender IS NOT NULL)" is a valid expression,
assuming elements contains fields 'name' and 'gender'.
Note: This feature is currently in experimental state and may change in the future!
expr | The string based expression to use. |
---|
Sets the geometry used for proximity search.
If geometry is set, then projection must be also defined.
geometry | The geometry used for proximity search. |
---|
Sets the projection to use for search geometry.
projection | The projection to use for search geometry. |
---|
Sets the regular expression used to search all the fields.
regex | The regular expression to use. |
---|
Sets the search radius for proximity search (in meters). The default is 0.
radius | The proximity search radius in meters. |
---|
Creates a string representation of this request object, useful for logging.