airborne12 commented on code in PR #67918:
URL: https://github.com/apache/doris/pull/67918#discussion_r4057171009


##########
be/src/storage/index/inverted/token_filter/pinyin_filter_factory.cpp:
##########
@@ -62,7 +62,10 @@ TokenFilterPtr PinyinFilterFactory::create(const 
TokenStreamPtr& in) {
 
     auto filter = std::make_shared<PinyinFilter>(in, config_);
     filter->initialize();
+    if (!config_->ignorePinyinOffset) {

Review Comment:
   Fixed in `0fdd4670ac9`.
   
   `ICUNormalizerFilter` now owns a conservative source map whenever 
normalization changes the token text: each rewritten rune maps to the original 
token span. The no-change path still delegates the precise upstream map, and 
`reset()` clears all rewritten-map state before reuse.
   
   The new ASAN test composes keyword -> ICU normalizer -> pinyin with source 
offsets enabled. It reproduced the incorrect `[2,5)` span before the fix and 
now gets `[0,6)` for both the initial compatibility-ligature input and a 
different reset/reuse input. The full `PinyinFilterTest` and 
`ICUNormalizerFilterFactoryTest` coverage passed as part of the combined 77/77 
BE run.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to