Chris Collins

Article

ViewScene: a desktop Luke alternative for inspecting Lucene indexes

A standalone JavaFX desktop app for inspecting and diagnosing Lucene indexes — documents, analyzers, and vector fields — as a desktop alternative to Luke.

· 2 min read

Search and retrievalDeveloper tools

If you’ve spent any time with Apache Lucene as a developer, you’ve probably wanted to peek inside an index. Maybe a query isn’t matching what you expected. Maybe the analyzer is doing something surprising. Maybe a vector field has the wrong dimensionality. The classic answer is Luke, the Lucene Inspector — but Luke is a web app these days, and I missed having a real desktop tool.

So I built ViewScene: a standalone JavaFX desktop application for inspecting and diagnosing Lucene indexes. Self-contained fat JAR. Native desktop UI. No web server, no browser, no external dependencies beyond a JDK.

viewscene

What it shows you

  • Fields browser — every field across the index, with type, doc count, indexed/stored flags, vector dimensions if any

  • Document viewer — pick any doc by ID, see every field’s stored value, indexed terms, and term positions

  • Term dictionary — the actual postings list per field, browsable and searchable, with document frequencies

  • Search — run real Lucene queries against the open index, see results ranked with explanations

  • Vector search — for KNN-indexed fields, run a vector query (with explicit embedding input or text-to-embedding via a configured analyzer)

  • Analysis pipeline — type in text, pick a field, see exactly what tokens come out at every analyzer stage. The most useful tab when you’re trying to understand “why doesn’t this match?”

  • Index tools — segment listings, commit history, optimize / force-merge / delete operations (read-write mode is opt-in)

05 vector search

The interesting parts

Fat JAR with no install

Download one file, double-click, you’re inspecting an index. No Maven repo to bootstrap, no Node modules, no server to run alongside. The whole thing — UI, Lucene core, vector support — gets packed into a single executable JAR via the Maven Shade plugin with merged service files. Total weight is around 50 MB, which is mostly the Lucene + JavaFX runtime.

Direct API access, not a query layer

Many index inspectors are wrappers around a query DSL. ViewScene uses the Lucene API directly: IndexReader.leaves(), Terms.iterator(), PostingsEnum, FloatVectorValues. The UI panels are thin views over those APIs. That keeps the tool honest — if Lucene shows it, ViewScene can show it. If Lucene doesn’t, neither does ViewScene.

Vector search with explainability

06 analysis

The vector-search panel does what Luke historically hasn’t: lets you submit a query vector (either as numbers or as text routed through an analyzer + embedding hook), runs a real knnFloatVectorQuery, and shows the actual distance scores per hit. Combined with the analysis pipeline tab, this turned out to be invaluable for debugging KNN-based “AI search” features: you can see why doc 47 ranked above doc 12 in actual numbers.

Origin: hitorro

The core viewer module was originally part of the Hitorro project. I extracted it into a standalone, fully independent tool so it could be used outside that context. The base was clean; the standalone work was mostly stripping coupling and packaging.

Why this matters

If you build anything on Lucene, you eventually need to look inside an index. ViewScene exists so that “look inside an index” is one double-click away — same as opening a database GUI. The web-based alternatives are great when you have infrastructure for them; for the case where you just want to drag-drop an index path and look at fields, a desktop tool wins.

Source

github.com/geekychris/lucene_viewer. JavaFX, fat JAR, MIT license.

#lucene#search#java#javafx#desktop

Related

Article ·

gitwebsite is now open source

The engine behind this site — a Rust static-site generator with a CLI, REST API, MCP server, and desktop app — is now on GitHub under the MIT licence.

Developer tools