Interface TextIndexService

All Known Implementing Classes:
TextIndexServiceImpl

public interface TextIndexService
interface for managing text documents
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    function for deleting text documents
    void
    function: deletes all textDocuments that are available
    boolean
    function: check if textDocuments exist with a specific title, used in tests
    void
    function: index a text into our opensearch client
  • Method Details

    • indexText

      void indexText(TextDocument text)
      function: index a text into our opensearch client
      Parameters:
      text - the TextDocument we want to index
    • existsByTitle

      boolean existsByTitle(String title)
      function: check if textDocuments exist with a specific title, used in tests
      Parameters:
      title - string
      Returns:
      true if the title exists, else false
    • deleteAll

      void deleteAll() throws IOException
      function: deletes all textDocuments that are available
      Throws:
      IOException - when there is an error deleting all entries
    • delete

      void delete(Integer id) throws IOException
      function for deleting text documents
      Parameters:
      id - - the textDocument id to delete
      Throws:
      IOException - when deletion fails