wikimedia/lucene-explain-parser

Parsing and pretty-printing Lucene explain data

2.0.0 2022-03-15 17:12 UTC

This package is not auto-updated.

Last update: 2022-07-26 23:30:58 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;