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

strange cut string in the autocomplete leading to no results #10

Closed
eroux opened this issue Jul 23, 2024 · 5 comments
Closed

strange cut string in the autocomplete leading to no results #10

eroux opened this issue Jul 23, 2024 · 5 comments
Assignees

Comments

@eroux
Copy link
Contributor

eroux commented Jul 23, 2024

see

Screen.Recording.2024-07-23.at.10.41.43.AM.mov
@eroux
Copy link
Contributor Author

eroux commented Jul 25, 2024

this is an interesting issue, I can't find the corresponding documentation but it seems the results given by autocomplete are truncated to 50 characters... still investigating but one way to just work around that would be: if the string is 50 characters, cut before the last space

@eroux
Copy link
Contributor Author

eroux commented Jul 25, 2024

I think I see what's going on, this is because the undocumented parameter max_input_length is 50 by default, so all results will be cut at 50 characters: opensearch-project/documentation-website#7877

eroux added a commit that referenced this issue Jul 25, 2024
@eroux
Copy link
Contributor Author

eroux commented Jul 25, 2024

looks fixed

@eroux eroux closed this as completed Jul 25, 2024
@roopeux
Copy link
Collaborator

roopeux commented Jul 25, 2024

I overwrote your fix because the root problem could be fixed in a simple way. I increased max_input_length to 100 so that automatic truncation will never happen, and limited tokens per autosuggest from 15 to 12 to avoid too long suggestions.
These settings will work for Wylie and any language where words are less than 8 chars in average.

bdrc_autosuggest has been reindexed with the version that is now in the repo. bdrc_search.py can be deployed, although it will probably not make difference.

@eroux
Copy link
Contributor Author

eroux commented Jul 26, 2024

I can't see any reason to overwrite my fix, it's not hurting and it will fix the few edge cases that will be above 100 chars, putting it back. Generally speaking please don't overwrite people's code on git without prior discussion, it's rude

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

2 participants