Class TRECIndexing

  • Direct Known Subclasses:
    TRECIndexingSinglePass

    public class TRECIndexing
    extends BatchIndexing
    This class creates the indices for a test collection.

    Properties:

    • trec.indexer.class - name of the class to use as the indexer. This only applies to the Index method.
    • trec.collection.class - name of the class to use as the Collection.
    Author:
    Gianni Amati, Vassilis Plachouras, Ben He, Craig Macdonald
    • Field Detail

      • collectionTREC

        protected Collection collectionTREC
        The collection to index.
    • Constructor Detail

      • TRECIndexing

        public TRECIndexing​(java.lang.String _path,
                            java.lang.String _prefix)
      • TRECIndexing

        public TRECIndexing​(java.lang.String _path,
                            java.lang.String _prefix,
                            java.lang.String collectionSpec)
        A constructor that initialised the data structures to use for indexing.
        Parameters:
        _path - Absolute path to where the index should be created
        _prefix - Prefix of the index files, usually "data"
      • TRECIndexing

        public TRECIndexing​(java.lang.String _path,
                            java.lang.String _prefix,
                            Collection c)
        A constructor that initialised the data structures to use for indexing.
        Parameters:
        _path - Absolute path to where the index should be created
        _prefix - Prefix of the index files, usually "data"
      • TRECIndexing

        public TRECIndexing()
        A default constructor that initialised the data structures to use for indexing.
    • Method Detail

      • loadIndexer

        protected Indexer loadIndexer​(java.lang.String pa,
                                      java.lang.String pr)
      • index

        public void index()
        Calls the method index(Collection[]) of the class Indexer in order to build the data structures for a set of collections. This particular method of the Indexer uses a set of builders for a subset of the collection and builds separate data structures, which are later merged.
        Specified by:
        index in class BatchIndexing
      • main

        public static void main​(java.lang.String[] args)
        Used for testing purposes.
        Parameters:
        args - the command line arguments.