Interface DocumentalPartitioningStrategy

  • All Superinterfaces:
    PartitioningStrategy, Serializable
    All Known Implementing Classes:
    ContiguousDocumentalStrategy

    public interface DocumentalPartitioningStrategy
    extends PartitioningStrategy
    A way to associate a document with a local index out of a given set and a local document number in the local index.

    When partitioning documentally an index, we need a way to associate to each global document pointer a local index (the index that will contain the postings of that document) and a local document pointer (the document pointer actually represented in the local index).

    Usually, a documental partitioning strategy has a matching DocumentalClusteringStrategy whose methods satisfy the following equations:

     globalPointer(localIndex(d), localPointer(d)) = d
     <localIndex(globalPointer(i, l)), localPointer(globalPointer(i, l))> = <i, l>
     
    Author:
    Alessandro Arrabito, Sebastiano Vigna
    • Method Summary

      Modifier and Type Method Description
      int localIndex​(long globalPointer)
      Returns the index to which a given global document pointer is be mapped by this strategy.
      long localPointer​(long globalPointer)
      Returns the local document pointer corresponding to a global document pointer.
      long numberOfDocuments​(int localIndex)
      Returns the number of documents that will be assigned to the given local index.
    • Method Detail

      • localIndex

        int localIndex​(long globalPointer)
        Returns the index to which a given global document pointer is be mapped by this strategy.
        Parameters:
        globalPointer - a global document pointer.
        Returns:
        the corresponding local index.
      • localPointer

        long localPointer​(long globalPointer)
        Returns the local document pointer corresponding to a global document pointer.
        Parameters:
        globalPointer - a global document pointer.
        Returns:
        the corresponding local document pointer.
      • numberOfDocuments

        long numberOfDocuments​(int localIndex)
        Returns the number of documents that will be assigned to the given local index.
        Parameters:
        localIndex - the local index.
        Returns:
        the number of documents that will be assigned to localIndex.