-
- 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 documentTo obtain a
MatchesIterator
for a particular field, callgetMatches(String)
. Note that you can callgetMatches(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 aMatchesIterator
over the matches for a single field, ornull
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
-
-
-
Method Detail
-
getMatches
MatchesIterator getMatches(java.lang.String field) throws java.io.IOException
Returns aMatchesIterator
over the matches for a single field, ornull
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
-
-