Apparently poppler or something needs open() with write
flags to render pdfs with proper fonts.
Landlock guards file system write access, so this is fine.
The cached order position introduced in 42e9ac5 is incorrect
as it does not consider the case when we are viewing any
other result page than the first.
Fix this by considering which page we are in when calculating
the offset
Previously, the order of previews would depend simply
on which generator would finish first.
Fix this by caching out of order previews. This may
cause a small delay but should overall be hardly noticable.
Search the trigram index too, combining the results
with the results of the "normal" fts index.
Prioritize the latter since it makes more sense to
rank whole words higher.
Processing dirs with large docs takes time and waiting till the threshold
is reached can be a bit annoying in those cases, so report if last report
was 10+ seconds ago.
We use this semi-HTML mode to highlight words, but if we already
have tags in the document this does not work quite well.
Thus, escape the string before further processing it
The current snippet selection is useless for many queries.
Attempt a more reasonable snippet selection by prioritizing
those where all words are contained. The more words a snippet
has, the more important it is considered.Therefore, those will
be at the top.
Only highlight whole words
Crashes were observed, faulting in libQtNetwork.
Those were rather rare. We also have no traces.
Probably depends on some order signal/slots were
processed. Remove shared states between connections,
such as the IPCPreviewWorker and socket instance in IPCServer.
group_concat() does not preserve order of the ORDRE BY rank,
making the ordering quite meaningless for pages inside a file.
The recently introduced combobox to filter on a per file basis
should anyway be prefered than any kind of grouping in queries.
So we just remove the groupings here.
"All files" in the previews tab thus should show the best results
first now, from any files part of the result set.
A GUI option to sort by page instead of rank can be considered.
Indirectly generation would fire when we set combobox index
programitcally. So it's slot should only trigger the generation
when the user is viewing the preview tab