Interface FulltextIndexService

All Known Implementing Classes:
AbstractFulltextIndexService, ElasticSearchFulltextIndexService, FakeFulltextIndexService

public interface FulltextIndexService
This is the main service of the enterprise search functionality. It provides the interface to the underlying index engine.
  • Method Details

    • setupIndex

      default void setupIndex()
      Setup mapping in a new index
    • runCompleteIndexing

      void runCompleteIndexing()
      Do a complete indexing of the whole database. It iterates over all entity types and starts with the ones with the highest indexing-priority. Entity types with indexing-priority of -1 are not included. This method can only be executed once per instance.
      See Also:
    • runIndexingForEntity

      void runIndexingForEntity(String entityModelName)
      Do indexing of the specified entity model.
      Parameters:
      entityModelName - a valid entity model name
      See Also:
    • runCompleteIndexCheck

      void runCompleteIndexCheck()
      Check the whole index. It checks first if the count of a entity model matches (database vs. index) and the checks the version of each record. This method can only be executed once per instance.
      See Also:
    • checkIndexForEntity

      boolean checkIndexForEntity(String entityModelName)
      Check the index for the specified entity model.
      Parameters:
      entityModelName - a valid entity model name
      See Also:
    • fixIndex

      void fixIndex()
    • wasTaskRun

      boolean wasTaskRun(String taskName)
      returns true if the task already ran for the current revision
    • truncateIndex

      void truncateIndex()
      Truncates (remove all records) the whole index. USE WITH CARE! This method can only be executed once per instance.
    • addEntity

      void addEntity(Entity entity)
      Adds the specified entity to the index. This is / should used only internally by updating listener.
      Parameters:
      entity - a entity to do the specified operation with
    • updateEntity

      void updateEntity(Entity entity)
      Updates the specified entity to the index. This is / should used only internally by updating listener.
      Parameters:
      entity - a entity to do the specified operation with
    • deleteEntity

      void deleteEntity(EntityId entityId)
      Removes the specified entity from the index. This is / should used only internally by updating listener.
      Parameters:
      entityId - an entity-id to do the specified operation with
    • query

      FulltextSearchResponse query(FulltextSearchQuery fulltextSearchQuery)
      Query the index with the specified fulltext search query.
      Parameters:
      fulltextSearchQuery - a fulltext search query object
      Returns:
      a fulltext search response object
    • fetchSuggestions

      List<String> fetchSuggestions(String queryString)
      Runs a suggestion query against the index with the specified query string.
      Parameters:
      queryString - any query string in lucene syntax
      Returns:
      a list of strings with suggestions