Searching for “text” in the attached document shows 6 hits, although there are supposed to be only 5.
If you search for “highlight” you also get one more result than expected.
It seems to be related to the hyperlink at the bottom of the first page, every word here is found twice.
GroupDocs Parser 20.12 was used in .NET.
using (Parser parser = new Parser("Aspose Sample.docx"))
{
// Search a keyword with page numbers
IEnumerable<SearchResult> sr = parser.Search("text", new SearchOptions(false, false, false, true));
// Iterate over search results
foreach (SearchResult s in sr)
{
// Print an index, page number and found text:
Console.WriteLine(string.Format("At {0} (page {1}): {2}", s.Position, s.PageIndex, s.Text));
}
}
We searched for keyword “highlight” and it showed two results. Although there is only one such word in the source file (Aspose Sample.docx).
And when we searched “text” keyword, it showed 6 results. Contrary, there are 14 results in the Word file.
Could you please confirm?
However, we have logged this behavior at our end. Your investigation ticket ID is PARSERNET-1727.
The issues you have found earlier (filed as PARSERNET-1727) have been fixed in this update. This message was posted using Bugs notification tool by albertakhmetov
I checked with the new Parser version 21.2, but I still get the described error.
Is there something I have to change in code as well, or should it work out of the box?