-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
Current wildcard field implementation uses SortedSet as the doc value type, which will trigger an dynamic pruning in lucene when the size is less than total docs and query contains sort.
Spefically, lucene expect the term dict also contains the doc values, but this is not true for wildcard, because it uses N-gram to generate terms, but full value in doc value, which will cause an IllegalState Exception
Related component
Search
To Reproduce
I add another yaml test case under my repo HUSTERGS@8c7cb9b
Expected behavior
Wildcard sort can work properly
Additional Details
Additional context
I'm thinking about backward compatibility, the simplest way is to change SortedSetDocValue to BinaryDocValue, but already written data might have problem when upgrade the OS, we can add some version check to solve this. Another way is to add the full value to the term dict explicitly by WildcardFieldTokenizer which may help address this problem
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
