I checked my Flarum's popular searches and found there are many searches made during the composition of IME, which are unnecessary searches that will return inaccurate results.
So I came up with an optimization idea, it's possible to hold the sending of search requests with compositionstart
and compositionend
event. By doing so, the number of unnecessary searches can decrease.
https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event
https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event
However, it's better to provide a setting to disable this functionality, since sometimes it's useful for some search backends that are optimized for these composition buffer content (Pinyin) and can provide some useful suggestions.