public class

VectorElementSearchService

extends Object
java.lang.Object
   ↳ com.carto.search.VectorElementSearchService

Class Overview

A search service for finding vector elements from the specified vector data source.
Depending on the datasource, searching may perform network requests and must be executed in non-UI background thread.

Summary

Public Constructors
VectorElementSearchService(VectorDataSource dataSource)
Constructs a VectorElementSearchService for the given vector data source.
Public Methods
synchronized void delete()
VectorElementVector findElements(SearchRequest request)
Searches for the vector elements specified by search request from the data source bound to the service.
VectorDataSource getDataSource()
Returns the vector data source of the search service.
int getMaxResults()
Returns the maximum number of results the search service returns.
void setMaxResults(int maxResults)
Sets the maximum number of results the search service returns.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public VectorElementSearchService (VectorDataSource dataSource)

Constructs a VectorElementSearchService for the given vector data source.

Parameters
dataSource The vector data source to search from.

Public Methods

public synchronized void delete ()

public VectorElementVector findElements (SearchRequest request)

Searches for the vector elements specified by search request from the data source bound to the service.
Depending on the data source, this method may perform slow IO operations and may need to be run in background thread.

Parameters
request The search request containing search filters.
Returns
  • The resulting list of vector elements matching the request.

public VectorDataSource getDataSource ()

Returns the vector data source of the search service.

Returns
  • The vector data source of the search service.

public int getMaxResults ()

Returns the maximum number of results the search service returns.

Returns
  • The maximum number of results the search service returns.

public void setMaxResults (int maxResults)

Sets the maximum number of results the search service returns.
The default number of results is 1000.

Parameters
maxResults The new maximum number of results the geocoding service returns.