Interface IndexBuilder<C>

All Known Subinterfaces:
IndividualContentIndexBuilder<C,​U>
All Known Implementing Classes:
AbstractIndexBuilder, AbstractIndividualContentIndexBuilder, LuceneBuilder, LuceneForwardIndexBuilder, LucenePositionalIndexBuilder, WrapperIndividualContentIndexBuilder

public interface IndexBuilder<C>
Interface for an object that builds an index.
  • Method Summary

    Modifier and Type Method Description
    void close​(java.lang.String indexPath)
    Closes the builder.
    int indexText​(java.lang.String content, C contentId)
    Writes the contents of a user in the index.
    void init​(java.lang.String indexPath)
    Initializes the builder.
  • Method Details

    • init

      void init​(java.lang.String indexPath) throws java.io.IOException
      Initializes the builder.
      Parameters:
      indexPath - path containing the index.
      Throws:
      java.io.IOException - if something fails while initializing the index.
    • indexText

      int indexText​(java.lang.String content, C contentId) throws java.io.IOException
      Writes the contents of a user in the index.
      Parameters:
      content - the published content.
      contentId - the user.
      Returns:
      the identifier of the new document.
      Throws:
      java.io.IOException - if something fails while writing the contents.
    • close

      void close​(java.lang.String indexPath) throws java.io.IOException
      Closes the builder.
      Parameters:
      indexPath - path containing the index.
      Throws:
      java.io.IOException - if something fails while closing the index.