org.apache.lucene.monitor

## Class MultiMatchingQueries<T extends QueryMatch>

- java.lang.Object
- - org.apache.lucene.monitor.MultiMatchingQueries<T>

- Type Parameters:
    `T` - the type of QueryMatch returned

      public class MultiMatchingQueries<T extends QueryMatch>
      extends Object

  Class to hold the results of matching a batch of `Document`s against queries held in the Monitor

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBatchSize()`
    `Map<String,Exception>` | `getErrors()`
    `int` | `getMatchCount(int docId)`
    `Collection<T>` | `getMatches(int docId)`
    `int` | `getQueriesRun()`
    `long` | `getQueryBuildTime()`
    `long` | `getSearchTime()`
    `T` | `matches(String queryId, int docId)` Returns the QueryMatch for the given query and document, or null if it did not match

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### matches

          public T matches(String queryId,
                           int docId)

      Returns the QueryMatch for the given query and document, or null if it did not match
      Parameters:
        `queryId` - the query id
        `docId` - the doc id
      Returns:
        the QueryMatch for the given query and document, or null if it did not match

    - #### getMatches

          public Collection<T> getMatches(int docId)

      Parameters:
        `docId` - document id to check
      Returns:
        all matches for a particular document

    - #### getMatchCount

          public int getMatchCount(int docId)

      Parameters:
        `docId` - document id to check
      Returns:
        the number of queries that matched for a given document

    - #### getQueryBuildTime

          public long getQueryBuildTime()

      Returns:
        how long (in ms) it took to build the Presearcher query for the matcher run

    - #### getSearchTime

          public long getSearchTime()

      Returns:
        how long (in ms) it took to run the selected queries

    - #### getQueriesRun

          public int getQueriesRun()

      Returns:
        the number of queries passed to this CandidateMatcher during the matcher run

    - #### getBatchSize

          public int getBatchSize()

      Returns:
        the number of documents in the batch

    - #### getErrors

          public Map<String,Exception> getErrors()

      Returns:
        a List of any MatchErrors created during the matcher run

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.