pucene/index

Index package for pucene.

Maintainers

Details

github.com/pucene/index

Source

Issues

Installs: 17

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

pkg:composer/pucene/index

0.1.x-dev 2022-12-31 22:17 UTC

This package is auto-updated.

Last update: 2025-09-29 03:06:36 UTC


README

The index is the main entry point for pucene. It analyses, stores and searches for documents.

To store the documents it uses a driver which is independent and the reference implementation is done in pucene/dbal-driver.

This is a subtree split of the pucene/pucene project create issues in the main repository.

Usage

<?php

use Pucene\Analysis\StandardAnalyzer;
use Pucene\Index\Driver\MemoryDriverFactory;
use Pucene\Index\PuceneIndexFactory;
use Schranz\Search\SEAL\Schema\Index;
use Schranz\Search\SEAL\Schema\Field;

$driverFactory = new MemoryDriverFactory();

$indexFactory = new PuceneIndexFactory(
    $driverFactory,
    new StandardAnalyzer(),
);

$index = $indexFactory->create(new Index('blog', [
    'id' => new Field\IdentifierField('id'),
    'title' => new Field\TextField('title'),
]));