Hi,
I’m facing a very weird issue with searching functionality in the library version 8.7.2 (core). The problem is that when I try to search a long text containing wildcards, I get multiple searchListener callbacks. In some of the callbacks, there are no search results found and in one of the callbacks, I get that one result is found which is the expected result. Eg. search query in this scenario is blow
ater Ingress into Unit on Ground Floor*A report was received from BC Building Science with several recommendations for*repair.*Directives: Council has directed that 3 quotations for repair be requested using the*BC Building Science report repair options and recommendations as a guideline for a
With some other search terms, sometimes, I don’t even get any callback, however the result is highlighted in the pdf. Example search query is below
leased or rented at any given time.*(b) No owner shall rent or lease their unit on anything less than a*yearly basis, or such longer term as the Council may establish.*(c) These limitations shall be administered and enforced by the Strata*Council```
PDF is this -> http://realtycheck.verifyr.ai/xolnb
Here is the search functionality
UI.addSearchListener(searchListener);
var search = function(search_term) {
console.log("Initiating search: " + search_term)
pdfjs_instance.UI.searchText(search_term, {
wildcard:true
})
pdfjs_instance.UI.closeElements([ ‘searchPanel’ ]);
}
Here is the search listener function
var searchListener = function(searchValue, options, results) {
console.log(CALLBACK: ${searchValue}.
)
console.log(results);
console.log(Time taken ${(performance.now() - start_time) / 1000}s. Total results found ${results.length}
)