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

[Bug]: inverted index does not support string longer than 65530 #37855

Open
1 task done
sunby opened this issue Nov 20, 2024 · 10 comments
Open
1 task done

[Bug]: inverted index does not support string longer than 65530 #37855

sunby opened this issue Nov 20, 2024 · 10 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@sunby
Copy link
Contributor

sunby commented Nov 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: master
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

If you insert strings longer than 65530, milvus will not return warnings or errors but tantivy's log will print warning.
img_v3_02gq_0c79e9b7-0011-41a8-aba0-00892d2c03eg

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

No response

Anything else?

No response

@sunby sunby added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 20, 2024
@zhuwenxing
Copy link
Contributor

insert strings longer than 65530

Is this referring to the length of the entire string or the length of a single word?

@sunby
Copy link
Contributor Author

sunby commented Nov 20, 2024

insert strings longer than 65530

Is this referring to the length of the entire string or the length of a single word?

it's a const variable MAX_TOKEN_LEN in tantivy, so I think it's a word.

@sunby
Copy link
Contributor Author

sunby commented Nov 20, 2024

I will do some tests to check what's the influence for query using inverted index.

@sunby
Copy link
Contributor Author

sunby commented Nov 20, 2024

/assign

@xiaofan-luan
Copy link
Collaborator

how can a token be that long?

We do need to tune the max varchar length field. is there anything stop us from increasing varchar to 256K or 1M?

@yanliang567
Copy link
Contributor

/assign @sunby
/unassign

@yanliang567 yanliang567 added this to the 2.5.0 milestone Nov 21, 2024
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 21, 2024
@sunby
Copy link
Contributor Author

sunby commented Nov 21, 2024

how can a token be that long?

We do need to tune the max varchar length field. is there anything stop us from increasing varchar to 256K or 1M?

We tested inverted index with 65535 length string and this warning occured.

@sunby
Copy link
Contributor Author

sunby commented Nov 21, 2024

I write an unit test to verify it. And strings longer than 65530 can not be searched because they are dropped in tantivy.

https://github.com/quickwit-oss/tantivy/blob/c71ea7b2effe6494c1a2b9e234db71f89255c06a/src/postings/postings_writer.rs#L139-L148

@sunby
Copy link
Contributor Author

sunby commented Nov 21, 2024

how can a token be that long?

We do need to tune the max varchar length field. is there anything stop us from increasing varchar to 256K or 1M?

We use "raw" tokenizer which means no tokenizer in tantivy.

@xiaofan-luan
Copy link
Collaborator

how can a token be that long?
We do need to tune the max varchar length field. is there anything stop us from increasing varchar to 256K or 1M?

We use "raw" tokenizer which means no tokenizer in tantivy.

This seems to be a non blocker issue.

Is there a blocking issue if we want to grow the size of varchar to 256k? like we use some smaller bits for a size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants