Class VectorElementSearchService

java.lang.Object
com.massifmaps.search.VectorElementSearchService

public class VectorElementSearchService extends Object
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.
  • Constructor Details

    • VectorElementSearchService

      public VectorElementSearchService(VectorDataSource dataSource)
      Constructs a VectorElementSearchService for the given vector data source.
      Parameters:
      dataSource - The vector data source to search from.
  • Method Details

    • getDataSource

      public VectorDataSource 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

      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.