You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: Use NLP word breaker in fulltext query. #21774
Is there an existing issue for the same feature request?
I have checked the existing issues.
Is your feature request related to a problem?
At this moment we used a simple space/punctuation breaking for latin and 3-gram
for CJK in BOTH indexing time and query time.
Sometimes it is more desirable to use a NLP word breaker.
Describe the feature you'd like
Our word breaker is pluggable. We can use any word breaker in either indexing time or query time.
There are both advantages and disadvantages to use a NLP word breaker. I would suggest at this moment, we keep the simple 3-gram breaker at indexing time. For query time, esp when match in natural language mode, we should consider using NLP word breaker.
Describe implementation you've considered
No response
Documentation, Adoption, Use Case, Migration Strategy
I think we have to stick with one tokenizer in index time and search time. Otherwise, we cannot find the answer. e.g. 但是可以接入 3- gram will break down to "但是可", "是可以", "以接入", "接入", "入". but dictionary-based tokenizer will break down to "但是", "可以", "接入 ". If 3-gram in index table, search time with dict-based, It won't find anything, unless all search become prefix_eq() instead of ==.
there is a problem in gojieba library too. It doesn't support N-gram. e..g the search string "是可" cannot be found in index. I don't think gojieba library is suitable for our needs.
Activity
cpegeric commentedon Apr 29, 2025
I think we have to stick with one tokenizer in index time and search time. Otherwise, we cannot find the answer. e.g. 但是可以接入 3- gram will break down to "但是可", "是可以", "以接入", "接入", "入". but dictionary-based tokenizer will break down to "但是", "可以", "接入 ". If 3-gram in index table, search time with dict-based, It won't find anything, unless all search become prefix_eq() instead of ==.
cpegeric commentedon Apr 29, 2025
there is a problem in gojieba library too. It doesn't support N-gram. e..g the search string "是可" cannot be found in index. I don't think gojieba library is suitable for our needs.
cpegeric commentedon Apr 29, 2025
The only way to reduce the number of token is to use 2-GRAM.
BUG FIX: Fulltext skip overlap from N-gram output 2.1-dev (#21799) (#…
cpegeric commentedon Jul 21, 2025
09
cpegeric commentedon Aug 27, 2026
please close this issue as we already have gojieba