Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem when establishing an unique key index for a string field that is too long (greater than 480) #508

Open
lipanpan03 opened this issue May 10, 2024 · 0 comments

Comments

@lipanpan03
Copy link
Collaborator

lipanpan03 commented May 10, 2024

目前对于一个string类型的属性建立主键索引时,如果其长度大于480字节,会存在问题:

  1. lgraph_import和调用db.AddIndex或create cypher语句的表现不一致:
    1.1. lgraph_import会在建索引时直接报错,而调用db.AddIndex则会对属性进行截断使之不超过480字节,从而成功插入
    1.2. 如果是使用的db.AddIndex或create cypher语句插入的点,在查询时也会做截断,从而导致插入的a...ab(480个a)可以通过a...ax(480个a)查询得到,这是不符合预期的

在新建非主键索引的时候,lgraph_import和cypher语句的表现是一致的,但是仍然会遇到上述1.2的问题

@lipanpan03 lipanpan03 changed the title A problem when establishing a primary key index for a string field that is too long (greater than 480) A problem when establishing an unique key index for a string field that is too long (greater than 480) May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant