Skip to content

Fluent API for creating Indexes on jsonb #1753

@leonkosak

Description

@leonkosak

My use case:
Jsonb column stores json documents, which are:

  • properties only on 1st level
  • only decimals (and some integers), few booleans and very rare strings (up to 7 characters)

There are no nested objects.
When document is inserted in jsonb, there is little chance that properties are updated. The main operation is reading.

There has to be index on every property (because of real-time overview in application with filter applied) - real-time datagrid widget and map.
Ther will be many properties inside json document (100+).

My question is the following:
Is possible to create (define) indexes for properties inside jsonb column in EF Core migrations (builder)?

Are there more optimal solutions for my use case? I would like to stay away from Elasticsearch for now (because data copying adds some delay and this is not acceptable).

Thank you for explanations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions