mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
perf: add missing index on chunks.document_id for faster search retrieval
This commit is contained in:
parent
6eabfe2396
commit
fffef4cb5e
2 changed files with 42 additions and 1 deletions
|
|
@ -959,7 +959,7 @@ class Chunk(BaseModel, TimestampMixin):
|
|||
embedding = Column(Vector(config.embedding_model_instance.dimension))
|
||||
|
||||
document_id = Column(
|
||||
Integer, ForeignKey("documents.id", ondelete="CASCADE"), nullable=False
|
||||
Integer, ForeignKey("documents.id", ondelete="CASCADE"), nullable=False, index=True
|
||||
)
|
||||
document = relationship("Document", back_populates="chunks")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue