Skip to content

Rebuild datahike index #728

@alekcz

Description

@alekcz

Describe the feature you would like to request

I would like a way to rebuild the index.

I have 40m+ datoms and my index is broken. d/query almost always returns nothing.

Describe the solution you would like

(d/re-index conn)

Similar to gc-storage this is something one can run in the background.

Describe alternatives you've considered

(->>  (d/datoms @conn {:index :avet :components [:kind/attr]}) 
      (map first) 
      (d/pull-many @conn [:kind/attr :kind/attr-i-want :kind/attr-i-want-2])
      (filter #(-> % :kind/attr-i-want (= "something"))))

Obviously this is not a sustainable way to live. I'm happy to build the feature. I just need two things.

  • To be pointed in the right direction.
  • A review when it's done

This is blocking [#727] because I can't validate that all datoms where imported successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions