mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-06 01:40:32 +02:00
reduce number of chars to index for search
This commit is contained in:
parent
f767b1f476
commit
23073d91b9
@ -17,11 +17,11 @@ depends_on = None
|
|||||||
|
|
||||||
def upgrade() -> None:
|
def upgrade() -> None:
|
||||||
# Create a basic index on the lowercase message column for direct text matching
|
# Create a basic index on the lowercase message column for direct text matching
|
||||||
# Limit to 2000 characters to stay well under the 8191 byte limit
|
# Limit to 1500 characters to stay well under the 2856 byte limit of btree version 4
|
||||||
op.execute(
|
op.execute(
|
||||||
"""
|
"""
|
||||||
CREATE INDEX idx_chat_message_message_lower
|
CREATE INDEX idx_chat_message_message_lower
|
||||||
ON chat_message (LOWER(substring(message, 1, 2000)))
|
ON chat_message (LOWER(substring(message, 1, 1500)))
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user