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

# Plucene::Index::TermInfosWriter(3pm)

write to the term infos file

## NAME

Plucene::Index::TermInfosWriter - write to the term infos file

## SYNOPSIS

```
        my $writer = Plucene::Index::TermInfosWriter->new(
                $dir_name, $segment, $field_infos);
        $writer->add(Plucene::Index::Term $term,
                        Plucene::Index::TermInfo $term_info);
        $writer->write_term(Plucene::Index::Term $term);
```

## DESCRIPTION

This will allow for the writing and adding to a term infos file for a  particular segment. It also writes the term infos index.

## METHODS

### new

```
        my $writer = Plucene::Index::TermInfosWriter->new(
                $dir_name, $segment, $field_infos);
```

This will create a new Plucene::Index::TermInfosWriter object.

### break\_ref

This will break a circular reference.

### add

```
        $writer->add(Plucene::Index::Term $term,
                        Plucene::Index::TermInfo $term_info);
```

This will add the term and term info to the term infos file.

### write\_term

```
        $writer->write_term(Plucene::Index::Term $term);
```

This will write the term to the term infos file.
