---
name: "Plucene::Search::Hits"
section: "3pm"
platform: "linux"
package: "libplucene-perl"
version: "1.25-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Plucene::Search::Hits"
---

# Plucene::Search::Hits(3pm)

A list of ranked documents

## NAME

Plucene::Search::Hits - A list of ranked documents

## SYNOPSIS

```
        my $hits = Plucene::Search::Hits->new;
        my     $doc = $hits->doc($n);
        my   $score = $hits->score($n);
        my $hit_doc = $hits->hit_doc($n);
```

## DESCRIPTION

This is a list of ranked documents, used to hold search results.

## METHODS

### new

```
        my $hits = Plucene::Search::Hits->new;
```

### query / searcher / filter / length / hit\_docs / first / last / num\_docs / max\_docs

Get / set these attributes.

### doc

```
        my $doc = $hits->doc($n);
```

Returns the nth document.

### score

```
        my $score = $hits->score($n);
```

The score of the nth document.

### hit\_doc

```
        my $hit_doc = $hits->hit_doc($n);
```

Returns the nth hit document.
