Package org.apache.lucene.search
Interface Matches
- All Known Implementing Classes:
NamedMatches
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.
-
Method Summary
Modifier and TypeMethodDescriptiongetMatches
(String field) Returns aMatchesIterator
over the matches for a single field, ornull
if there are no matches in that field.Returns a collection of Matches that make up this instance; if it is not a composite, then this returns an empty listMethods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getMatches
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
-