Class IndexingSession

java.lang.Object
org.ctan.site.services.search.base.IndexingBase
org.ctan.site.services.search.base.IndexingSession
All Implemented Interfaces:
Closeable, AutoCloseable

public class IndexingSession extends IndexingBase implements Closeable
The class IndexingSession contains the session which combines various update operations on the search indices.
  • Constructor Details

    • IndexingSession

      public IndexingSession(@NonNull @NonNull File indexBase) throws FileNotFoundException
      This is the constructor for IndexingSession.
      Parameters:
      indexBase - the base directory
      Throws:
      FileNotFoundException - in case of an improper directory
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
      See Also:
    • remove

      public void remove(@NotNull @NotNull IndexType indexType, @NotNull @NotNull String indexPath, @NotNull @NotNull String locale) throws IOException
      The method remove provides means to remove an item from the search index.
      Parameters:
      indexType - the index type
      indexPath - the key for identifying the indexed item
      locale - the locale
      Throws:
      IOException - in case of an I/O error
    • updateIndex

      public void updateIndex(@NotNull @NotNull String path, @NotNull @NotNull IndexingSession.IndexArgs args) throws IOException
      The method updateIndex provides means to update the search index.
      Parameters:
      path - the URL of the item
      args - the arguments
      Throws:
      IOException - in case of an I/O error