Class SearchTravRetLoadFieldSelectorTask

  • All Implemented Interfaces:
    Cloneable

    public class SearchTravRetLoadFieldSelectorTask
    extends SearchTravTask
    Search and Traverse and Retrieve docs task using a SetBasedFieldSelector.

    Note: This task reuses the reader if it is already open. Otherwise a reader is opened at start and closed at the end.

    Takes optional param: comma separated list of Fields to load.

    Other side effects: counts additional 1 (record) for each traversed hit, and 1 more for each retrieved (non null) document.

    • Field Detail

      • fieldSelector

        protected org.apache.lucene.document.FieldSelector fieldSelector
    • Constructor Detail

      • SearchTravRetLoadFieldSelectorTask

        public SearchTravRetLoadFieldSelectorTask​(PerfRunData runData)
    • Method Detail

      • withRetrieve

        public boolean withRetrieve()
        Description copied from class: ReadTask
        Return true if, with search & results traversing, docs should be retrieved.
        Overrides:
        withRetrieve in class SearchTravTask
      • retrieveDoc

        protected org.apache.lucene.document.Document retrieveDoc​(org.apache.lucene.index.IndexReader ir,
                                                                  int id)
                                                           throws IOException
        Overrides:
        retrieveDoc in class ReadTask
        Throws:
        IOException
      • supportsParams

        public boolean supportsParams()
        Description copied from class: PerfTask
        Sub classes that support parameters must override this method to return true.
        Overrides:
        supportsParams in class SearchTravTask
        Returns:
        true iff this task supports command line params.