Package com.massifmaps.search
Class VectorElementSearchService
java.lang.Object
com.massifmaps.search.VectorElementSearchService
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.
Depending on the datasource, searching may perform network requests and must be executed in non-UI background thread.
-
Constructor Summary
ConstructorsConstructorDescriptionVectorElementSearchService(VectorDataSource dataSource) Constructs a VectorElementSearchService for the given vector data source. -
Method Summary
Modifier and TypeMethodDescriptionfindElements(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.Returns the vector data source of the search service.intReturns the maximum number of results the search service returns.voidsetMaxResults(int maxResults) Sets the maximum number of results the search service returns.
The default number of results is 1000.
-
Constructor Details
-
VectorElementSearchService
Constructs a VectorElementSearchService for the given vector data source.- Parameters:
dataSource- The vector data source to search from.
-
-
Method Details
-
getDataSource
Returns the vector data source of the search service.- Returns:
- The vector data source of the search service.
-
getMaxResults
public int getMaxResults()Returns the maximum number of results the search service returns.- Returns:
- The maximum number of results the search service returns.
-
setMaxResults
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.
-
findElements
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.
-