Interface LexicalPartitioningStrategy

  • All Superinterfaces:
    PartitioningStrategy, Serializable
    All Known Implementing Classes:
    ContiguousLexicalStrategy, FrequencyLexicalStrategy

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

    When partitioning lexically an index (i.e., termwise), we need a way to associate to each term a local index (the index that will contain the postings of that term) and a local term number (the number of the term in the local index).

    Usually, a lexical partitioning strategy has a matching LexicalClusteringStrategy whose methods satisfy the following equations:

     globalNumber(localIndex(t), localNumber(t)) = t
     <localIndex(globalNumber(i, l)), localNumber(globalNumber(i, l))> = <i, l>
     
    Author:
    Alessandro Arrabito, Sebastiano Vigna
    • Method Summary

      Modifier and Type Method Description
      int localIndex​(long globalNumber)
      Returns the index to which a given term number is mapped by this strategy.
      long localNumber​(long globalNumber)
      Returns the local term number given a global term number.
    • Method Detail

      • localIndex

        int localIndex​(long globalNumber)
        Returns the index to which a given term number is mapped by this strategy.
        Parameters:
        globalNumber - the term global number.
        Returns:
        the corresponding local index, or -1 if the term should be removed from the partitioned index.
      • localNumber

        long localNumber​(long globalNumber)
        Returns the local term number given a global term number.
        Parameters:
        globalNumber - a global term number.
        Returns:
        the corresponding local term number, or -1 if the term should be removed from the partitioned index.