Interface Matches

  • All Superinterfaces:
    java.lang.Iterable<java.lang.String>
    All Known Implementing Classes:
    NamedMatches

    public interface Matches
    extends java.lang.Iterable<java.lang.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.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      MatchesIterator getMatches​(java.lang.String field)
      Returns a MatchesIterator over the matches for a single field, or null if there are no matches in that field.
      java.util.Collection<Matches> getSubMatches()
      Returns a collection of Matches that make up this instance; if it is not a composite, then this returns an empty list
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • Method Detail

      • getMatches

        MatchesIterator getMatches​(java.lang.String field)
                            throws java.io.IOException
        Returns a MatchesIterator over the matches for a single field, or null if there are no matches in that field.
        Throws:
        java.io.IOException
      • getSubMatches

        java.util.Collection<Matches> getSubMatches()
        Returns a collection of Matches that make up this instance; if it is not a composite, then this returns an empty list