org.apache.lucene.search

## Class MatchNoDocsQuery

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

- All Implemented Interfaces:
    Cloneable

      public class MatchNoDocsQuery
      extends Query

  A query that matches no documents.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MatchNoDocsQuery()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Query` | `rewrite(IndexReader reader)` Expert: called to re-write queries into primitive queries.
    `String` | `toString(String field)` Prints a query to a string, with `field` assumed to be the default field and omitted.

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

      `clone, createWeight, equals, getBoost, hashCode, setBoost, toString`

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

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

- - ### Constructor Detail

    - #### MatchNoDocsQuery

          public MatchNoDocsQuery()

  - ### Method Detail

    - #### rewrite

          public Query rewrite(IndexReader reader)
                        throws IOException

      Description copied from class: `Query`
      Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.
      Overrides:
        `rewrite` in class `Query`
      Throws:
        `IOException`

    - #### toString

          public String toString(String field)

      Description copied from class: `Query`
      Prints a query to a string, with `field` assumed to be the default field and omitted.
      Specified by:
        `toString` in class `Query`

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