Package org.apache.lucene.monitor
Class HighlightsMatch
- java.lang.Object
-
- org.apache.lucene.monitor.QueryMatch
-
- org.apache.lucene.monitor.HighlightsMatch
-
public class HighlightsMatch extends QueryMatch
QueryMatch object that contains the hit positions of a matching QueryIf the Query does not support interval iteration (eg, if it gets re-written to a Filter), then no hits will be reported, but an IntervalsQueryMatch will still be returned from an IntervalsMatcher to indicate a match.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HighlightsMatch.Hit
Represents an individual hit
-
Field Summary
Fields Modifier and Type Field Description static MatcherFactory<HighlightsMatch>
MATCHER
-
Fields inherited from class org.apache.lucene.monitor.QueryMatch
SIMPLE_MATCHER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Set<String>
getFields()
int
getHitCount()
Map<String,Set<HighlightsMatch.Hit>>
getHits()
Collection<HighlightsMatch.Hit>
getHits(String field)
Get the hits for a specific fieldint
hashCode()
String
toString()
-
Methods inherited from class org.apache.lucene.monitor.QueryMatch
getQueryId
-
-
-
-
Field Detail
-
MATCHER
public static final MatcherFactory<HighlightsMatch> MATCHER
-
-
Method Detail
-
getHits
public Map<String,Set<HighlightsMatch.Hit>> getHits()
- Returns:
- a map of hits per field
-
getHits
public Collection<HighlightsMatch.Hit> getHits(String field)
Get the hits for a specific field- Parameters:
field
- the field- Returns:
- the Hits found in this field
-
getHitCount
public int getHitCount()
- Returns:
- the total number of hits for the query
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classQueryMatch
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classQueryMatch
-
toString
public String toString()
- Overrides:
toString
in classQueryMatch
-
-