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
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.- 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 MatchesIterator
getMatches(String field)
Returns aMatchesIterator
over the matches for a single field, ornull
if 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 aMatchesIterator
over the matches for a single field, ornull
if 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
-
-