Skip to content

Facet search on entityType, the entity's class URI #56

Closed

Description

@johnf

Parent

#52

What to build

The search field type, which holds the raw @type list, is replaced by two fields. entityType holds the entity row's single class URI (the same value as the entity's entityType), as arocapi's examples do, and is a filter only, so filtering search agrees with listing entities by entityType. recordType is the "Record Type" facet, holding a readable label for that class (Collection, Object, File, Person, Organisation, Software Application; any other class falls back to the last part of its URI), because Oni can't label facet values. Oni's development and deploy configurations facet on recordType. The mapping changes, so existing search indexes must be deleted and rebuilt (expected for this release).

Ships on the one #52 branch and PR, as its own commit. See #52 for the decisions behind it.

Acceptance criteria

  • Search documents have entityType (one class URI) and recordType (its label), and no type
  • /search returns a recordType facet of labels; filtering on entityType returns the same entities as /entities?entityType=
  • Both Oni configurations facet on recordType and show readable labels for collections, objects, files and the other indexed types (checked in Oni under Docker Compose)
  • Tested through the API

Blocked by

None (can start immediately)

Activity

  1. johnf commented on Nov 4, 2026

    @johnf
    CollaboratorAuthor

    Implemented in #63. Changed from the original ticket: Oni can't label facet values (its aggregation config has no per-value labels, and it renders values as-is), so entityType stays the class URI as a filter only, and a new recordType facet holds a readable label (Collection, Object, File, Person, Organisation, Software Application; other classes fall back to the last part of the URI). Both Oni configurations facet on recordType. Still open: checking the labels in Oni under Docker Compose. The body is updated to match.

  2. johnf commented on Nov 4, 2026

    @johnf
    CollaboratorAuthor

    Checked in Oni under Docker Compose: after rebuilding the indexes, Oni's "Record Type" facet lists Collection (7), File (11), Object (5), Organisation (2), Person (3) and Software Application (1) for test-data, with no URIs. All acceptance criteria met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions