Skip to content

BE Info module shows knn_vector fields as "Nothing indexed" even when vectors are present #4651

Description

@dkd-dobberkau

Summary

In the backend Info module (Solr → Info → "Index Fields"), knn_vector fields
are always rendered with 0 documents and the placeholder text
Nothing indexed in the terms column — even on a fully vectorised index where
the HNSW segments contain millions of bytes of vector data and frontend
vector search returns relevant hits.

This is misleading: an operator looking at the report assumes vector indexing
is broken, when in fact it just isn't supported by the report's data source.

Root cause

Classes/Controller/Backend/Search/InfoModuleController.php:200,281:

// :200
$limitNote = 'Nothing indexed';

// :281 — fallback when Solr's Luke API doesn't return distinct
'terms' => $field->distinct ?? $limitNote,

The Luke API (/admin/luke) returns the usual docs and distinct counts
only for inverted-index fields. For solr.DenseVectorField (HNSW) it returns
only type and schema flags, e.g.:

"fields": {
  "vector": {
    "type": "knn_vector",
    "schema": "I---------OF------"
  }
}

No docs, no distinct. So the controller renders:

Field Type Docs Terms
vector knn_vector 0 Nothing indexed

…regardless of whether vectors are actually present. The same fallback would
also kick in for any future field type that doesn't expose distinct in
Luke output.

Reproduction

Verified locally on EXT:solr 14.0.0-beta1 with Apache Solr 10.0.0:

  1. Activate vector search (set plugin.tx_solr.search.query.type = 1,
    register an embedding model under name: "llm", configure the
    configset's URP chain to point to the same name — see Vector search: model name mismatch between configset (language-models) and code (llm) #4650).
  2. Re-index the site through the Index Queue Worker.
  3. Verify vectors are actually written:
    ddev exec -s solr-site "find /var/solr/data/data/<core>/data/index -name '*HnswVectors*'"
    # → multiple Lucene99HnswVectorsFormat_*.vec / .vex / .vem files, several MB
  4. Verify search works:
    curl -sk 'https://<site>/search?q=enterprise+search+platform' | grep -oE '<h3[^>]*>(.*?)</h3>'
    # → returns semantically related hits, with no keyword overlap in titles
  5. Open the BE: Solr → Info → Index Fields.
  6. Observe vector / knn_vector / 0 / Nothing indexed.

The vectors are demonstrably present and being queried — the report is wrong.

Suggested fix

Two layers, both small:

1. Distinguish "no information available" from "no data"

When the Luke response doesn't include distinct (and the field isn't simply
unindexed), render n/a or <em>not applicable</em> instead of
Nothing indexed. Concretely, in getFields():

'terms' => $field->distinct ?? ($field->type === 'knn_vector' ? 'n/a' : $limitNote),

…or check the schema flags in $field->schema and only show the
Nothing indexed placeholder when the field is actually Indexed and the
core has 0 documents.

2. (Optional) Add a vector-aware metric

When a knn_vector (or DenseVectorField) field is present, consider
showing one of:

  • Number of documents with the vector field set (q=*:*&fq=existsField)
  • Total size of the HNSW segment files
  • Vector dimension / similarity function from the schema

…either in the same row or in a dedicated panel. Operators currently have
no in-BE way to confirm "are my vectors actually there?" without reaching
for find on the filesystem.

Affected versions

  • 14.0.0-beta1 (current main)
  • Likely earlier alpha releases that introduced vector search support

Related

🤖 Reported with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions