Bug 428224 - Display the number of occurrences of the search term
Summary: Display the number of occurrences of the search term
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.2
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-25 09:36 UTC by Clarc
Modified: 2022-03-12 16:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clarc 2020-10-25 09:36:39 UTC
SUMMARY
Display the number of occurrences of the search-term.
This is a functionality that should make searching way more comfortable.

EXAMPLE:
You search for "house". Somewhere, possibly next to the page number or in an extended search-bar, add: "x/y". X would be the number of what term you're looking at (the 5th "house") and Y would be the number of "house"s found.
5/7 means you're looking at the fifth of seven "house"-occurrences.

It's a basic functionality which many pdf-viewers have.




SYSTEM INFORMATION
Okular-Verstion: Version 1.11.2
Linux Mint 20
KDE Frameworks 5.74.0
Qt 5.15.1 (built against 5.15.1)
The xcb windowing system
Comment 1 Albert Astals Cid 2020-10-25 10:59:21 UTC
To do this you need to search the whole document, which in 2000 pages documents takes a while, if we do this you will complain that search is suddently slow for no reason when the word you were seraching is just there in the first page
Comment 2 Nate Graham 2020-10-25 17:30:01 UTC
Yeah. I guess it could lazily populate that number only after the search has completed.
Comment 3 Clarc 2020-10-25 17:37:36 UTC
(In reply to Albert Astals Cid from comment #1)
> To do this you need to search the whole document, which in 2000 pages
> documents takes a while, if we do this you will complain that search is
> suddently slow for no reason when the word you were seraching is just there
> in the first page

1. You wouldn't have to search them all before displaying the results. It could simply be counting upwards while finding new results. If you look at other pdf-viewers, they do the same thing and it doesn't noticably change the speed.

2. Now that we know that this doesn't slow down, I have to agree: This feature probably is useless, if you try to find a very common word ("the") in a 200-Page document.
However:
a. As we have established, it doesn't noticeably slow down the searching process, thus it doesn't do any harm.
b. It really helps when searching somewhat common / uncommon words, no matter the document size. Which is why it should be included.

(In reply to Nate Graham from comment #2)
> Yeah. I guess it could lazily populate that number only after the search has
> completed.
I'm not sure what you mean by that.