org.apache.lucene.search

## Interface Matches

- All Superinterfaces:
    Iterable<String>

      public interface Matches
      extends Iterable<String>

  Reports the positions and optionally offsets of all matching terms in a query for a single document To obtain a `MatchesIterator` for a particular field, call `getMatches(String)`. Note that you can call `getMatches(String)` multiple times to retrieve new iterators, but it is not thread-safe.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Matches.MatchesIteratorSupplier` A functional interface that supplies a `MatchesIterator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Matches` | `MATCH_WITH_NO_TERMS` Indicates a match with no term positions, for example on a Point or DocValues field, or a field indexed as docs and freqs only

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Matches` | `forField(String field, Matches.MatchesIteratorSupplier mis)` Create a Matches for a single field
    `static Matches` | `fromSubMatches(List<Matches> subMatches)` Amalgamate a collection of `Matches` into a single object
    `MatchesIterator` | `getMatches(String field)` Returns a `MatchesIterator` over the matches for a single field, or `null` if there are no matches in that field.

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, iterator, spliterator`

- - ### Field Detail

    - #### MATCH_WITH_NO_TERMS

          static final Matches MATCH_WITH_NO_TERMS

      Indicates a match with no term positions, for example on a Point or DocValues field, or a field indexed as docs and freqs only

  - ### Method Detail

    - #### getMatches

          MatchesIterator getMatches(String field)
                              throws IOException

      Returns a `MatchesIterator` over the matches for a single field, or `null` if there are no matches in that field.
      Throws:
        `IOException`

    - #### fromSubMatches

          static Matches fromSubMatches(List<Matches> subMatches)

      Amalgamate a collection of `Matches` into a single object

    - #### forField

          static Matches forField(String field,
                                  Matches.MatchesIteratorSupplier mis)
                           throws IOException

      Create a Matches for a single field
      Throws:
        `IOException`

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