# OfficeDocumentSearchHit

One query occurrence and its source/page locations.

Class 

`OfficeIMO.Reader`

**Namespace**

`OfficeIMO.Reader`

**Assembly**

`OfficeIMO.Reader.Core`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OfficeDocumentSearch.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L50)

**Modifiers**

sealed

One query occurrence and its source/page locations.

## Inheritance

- object
- OfficeDocumentSearchHit

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [OfficeDocumentSearchResult.Hits](/api/reader/officeimo-reader-officedocumentsearchresult/#property-hits)

Filter members 

Show inherited

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OfficeDocumentBlock Block { get; }` [#](#property-block)

[OfficeDocumentSearch.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L50)

Normalized source block containing the occurrence.

`public int StartIndex { get; }` [#](#property-startindex)

[OfficeDocumentSearch.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L53)

Zero-based occurrence offset in [OfficeDocumentBlock.Text](/api/reader/officeimo-reader-officedocumentblock/).

`public int Length { get; }` [#](#property-length)

[OfficeDocumentSearch.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L56)

Occurrence length.

`public IReadOnlyList<OfficeDocumentPageLocation> Pages { get; }` [#](#property-pages)

[OfficeDocumentSearch.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L59)

Page-like locations that contain the matching source block fragment.

`public double? Score { get; }` [#](#property-score)

[OfficeDocumentSearch.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L62)

BM25 relevance score for ranked hits; null for literal and regular-expression hits.

`public IReadOnlyList<OfficeDocumentSearchHighlight> Highlights { get; }` [#](#property-highlights)

[OfficeDocumentSearch.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Reader.Core/OfficeDocumentSearch.cs#L68)

Matched ranges in [OfficeDocumentBlock.Text](/api/reader/officeimo-reader-officedocumentblock/). A literal hit has its one occurrence; a ranked hit has every matched word and phrase, and may have none when only the block's heading path matched.

<!-- PowerForge markdown artifact sha256:135C46F5FF0E9F96034DBBE5D0F387058E87F7A82F906588E8750E6C0BCF72FF -->
