org.apache.lucene.search

## Class AssertingQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.AssertingQuery

-     public final class AssertingQuery
      extends Query

  Assertion-enabled query.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AssertingQuery(Random random, Query in)` Sole constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Weight` | `createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)`
    `boolean` | `equals(Object other)`
    `Query` | `getIn()`
    `Random` | `getRandom()`
    `int` | `hashCode()`
    `Query` | `rewrite(IndexReader reader)`
    `String` | `toString(String field)`
    `void` | `visit(QueryVisitor visitor)`
    `static Query` | `wrap(Random random, Query query)` Wrap a query if necessary.

    - ### 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 Detail

    - #### AssertingQuery

          public AssertingQuery(Random random,
                                Query in)

      Sole constructor.

  - ### Method Detail

    - #### wrap

          public static Query wrap(Random random,
                                   Query query)

      Wrap a query if necessary.

    - #### createWeight

          public Weight createWeight(IndexSearcher searcher,
                                     ScoreMode scoreMode,
                                     float boost)
                              throws IOException

      Overrides:
        `createWeight` in class `Query`
      Throws:
        `IOException`

    - #### toString

          public String toString(String field)

      Specified by:
        `toString` in class `Query`

    - #### equals

          public boolean equals(Object other)

      Specified by:
        `equals` in class `Query`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `Query`

    - #### getRandom

          public Random getRandom()

    - #### getIn

          public Query getIn()

    - #### rewrite

          public Query rewrite(IndexReader reader)
                        throws IOException

      Overrides:
        `rewrite` in class `Query`
      Throws:
        `IOException`

    - #### visit

          public void visit(QueryVisitor visitor)

      Overrides:
        `visit` in class `Query`

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