org.apache.lucene.monitor

## Interface QueryTimeListener

-     public interface QueryTimeListener

  Notified of the time it takes to run individual queries against a set of documents

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `logQueryTime(String queryId, long timeInNanos)` How long it took to run a particular query
    `static <T extends QueryMatch> MatcherFactory<T>` | `timingMatcher(MatcherFactory<T> factory, QueryTimeListener listener)` A wrapping matcher factory to log query times to a QueryTimeListener

- - ### Method Detail

    - #### logQueryTime

          void logQueryTime(String queryId,
                            long timeInNanos)

      How long it took to run a particular query

    - #### timingMatcher

          static <T extends QueryMatch> MatcherFactory<T> timingMatcher(MatcherFactory<T> factory,
                                                                        QueryTimeListener listener)

      A wrapping matcher factory to log query times to a QueryTimeListener
      Parameters:
        `factory` - a matcher factory to use for the actual matching
        `listener` - the QueryTimeListener

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