Package org.apache.lucene.misc.search

# Class HumanReadableQuery

java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.misc.search.HumanReadableQuery

public final class HumanReadableQuery extends Query
A simple query wrapper for debug purposes. Behaves like the given query, but when printing to a string, it will prepend the description parameter to the query output.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HumanReadableQuery(Query in, String description)`
  Create a new HumanReadableQuery

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Weight`
  `createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)`
  `boolean`
  `equals(Object other)`
  `String`
  `getDescription()`
  `Query`
  `getWrappedQuery()`
  `int`
  `hashCode()`
  `Query`
  `rewrite(IndexSearcher indexSearcher)`
  `String`
  `toString(String field)`
  `void`
  `visit(QueryVisitor visitor)`

  ### Methods inherited from class org.apache.lucene.search.Query

  `classHash, sameClassAs, toString`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### HumanReadableQuery

    public HumanReadableQuery(Query in, String description)
    Create a new HumanReadableQuery
    Parameters:
      `in` - the query to wrap
      `description` - a human-readable description, used in toString()

- ## Method Details

  - ### getWrappedQuery

    public Query getWrappedQuery()
    Returns:
      the wrapped Query

  - ### getDescription

    public String getDescription()
    Returns:
      the query description

  - ### rewrite

    public Query rewrite(IndexSearcher indexSearcher)
    Overrides:
      `rewrite` in class `Query`

  - ### toString

    public String toString(String field)
    Specified by:
      `toString` in class `Query`

  - ### visit

    public void visit(QueryVisitor visitor)
    Specified by:
      `visit` in class `Query`

  - ### equals

    public boolean equals(Object other)
    Specified by:
      `equals` in class `Query`

  - ### createWeight

    public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
    Overrides:
      `createWeight` in class `Query`

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in class `Query`