---
name: "Lucy::Document::HitDoc"
section: "3pm"
platform: "linux"
package: "liblucy-perl"
version: "0.3.3-7+b1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Lucy::Document::HitDoc"
---

# Lucy::Document::HitDoc(3pm)

A document read from an index.

## NAME

Lucy::Document::HitDoc - A document read from an index.

## SYNOPSIS

```
    while ( my $hit_doc = $hits->next ) {
        print "$hit_doc->{title}\n";
        print $hit_doc->get_score . "\n";
        ...
    }
```

## DESCRIPTION

HitDoc is the search-time relative of the index-time class Doc; it is augmented by a numeric score attribute that Doc doesn't have.

## METHODS

### set\_score(score)

Set score attribute.

### *get\_score()*

Get score attribute.

## INHERITANCE

Lucy::Document::HitDoc isa Lucy::Document::Doc isa Lucy::Object::Obj.
