Package org.apache.lucene.search
Interface Matches
-
- All Known Implementing Classes:
NamedMatches
public interface Matches extends Iterable<String>
Reports the positions and optionally offsets of all matching terms in a query for a single documentTo obtain a
MatchesIteratorfor a particular field, callgetMatches(String). Note that you can callgetMatches(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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MatchesIteratorgetMatches(String field)Returns aMatchesIteratorover the matches for a single field, ornullif there are no matches in that field.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(String field) throws IOException
Returns aMatchesIteratorover the matches for a single field, ornullif there are no matches in that field.- Throws:
IOException
-
getSubMatches
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
-
-