Skip to content

Cannot search for KVs or tags #270

@allanlasser

Description

@allanlasser

Challenge

Right now, there's no way to provide users with an index of tags/keys/values they've used (or explore tags across DocumentCloud independent of documents). If we want to provide tags as a search facet, we'll need a way to search against them.

Proposed solution

One way to implement this would be to add an endpoint that supports searching against keys and their values.

  • We could then use that endpoint from the frontend to present a tag search UI that searches KVs with key=_tag&value={x}; would expect the results to conform to the type Array<{key: "_tag"; value: string[]}>.
  • We could allow users to search KVs with key={x}; would expect the results to conform to the type Array<{key: string; value: string[]}>.
  • We could allow users to find a specific KV pair by value, like key={x}&value={y}; would expect the results to conform to the type Array<{key: string; value: string[]}>.
  • Filter by project, so I can get a list of available keys for a single project
  • Implicitly limit to documents a user can see

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions