wikimedia/lucene-explain-parser

Parsing and pretty-printing Lucene explain data

2.0.0 2022-03-15 17:12 UTC

This package is auto-updated.

Last update: 2024-11-03 13:49:59 UTC


README

PHP Classes for parsing and pretty-printing Lucene explain structures.

Makes the data (more) human-readable.

This is all based on https://github.com/o19s/splainer-search, which does much nicer prints of lucene explains for splainer.io.

Usage:

use LuceneExplain\ExplainFactory;

$factory = new ExplainFactory();
$explain = $factory->createExplain( $jsonFromLucene );
$prettyResult = (string)$explain;