MatchHighlighter.QueryOffsetRange (Lucene 10.5.0 highlighter API)
Description: declaration: package: org.apache.lucene.search.matchhighlight, class: MatchHighlighter, class: QueryOffsetRange

Package org.apache.lucene.search.matchhighlight

# Class MatchHighlighter.QueryOffsetRange

java.lang.Object
org.apache.lucene.search.matchhighlight.OffsetRange
org.apache.lucene.search.matchhighlight.MatchHighlighter.QueryOffsetRange

All Implemented Interfaces:
  `Cloneable`

Enclosing class:
  `MatchHighlighter`

public static class MatchHighlighter.QueryOffsetRange extends OffsetRange
An `OffsetRange` of a match, together with the source query that caused it.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final Query`
  `query`

  ### Fields inherited from class org.apache.lucene.search.matchhighlight.OffsetRange

  `from, to`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `QueryOffsetRange(Query query, int from, int to)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MatchHighlighter.QueryOffsetRange`
  `slice(int from, int to)`
  Returns a sub-range of this range (a copy).

  ### Methods inherited from class org.apache.lucene.search.matchhighlight.OffsetRange

  `clone, contains, equals, hashCode, length, toString`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### query

    public final Query query

- ## Constructor Details

  - ### QueryOffsetRange

    public QueryOffsetRange(Query query, int from, int to)

- ## Method Details

  - ### slice

    public MatchHighlighter.QueryOffsetRange slice(int from, int to)
    Description copied from class: `OffsetRange`
    Returns a sub-range of this range (a copy). Subclasses should override and return an appropriate type covariant so that payloads are not lost.
    Overrides:
      `slice` in class `OffsetRange`