Commit Graph

45266 Commits

Author SHA1 Message Date
Kovid Goyal eba1b4f05e Handle query errors 2022-07-06 19:19:50 +05:30
Kovid Goyal d057f8e238 Show the number of matching books 2022-07-06 19:19:50 +05:30
Kovid Goyal 571e2b695e use single selection mode for fts results 2022-07-06 19:19:50 +05:30
Kovid Goyal 282a9a2b63 Use italic font for book titles 2022-07-06 19:19:50 +05:30
Kovid Goyal 53da2ebd54 Collapse identical (upto spaces) matches from different formats 2022-07-06 19:19:50 +05:30
Kovid Goyal 22596d077a Wire up search type controls 2022-07-06 19:19:50 +05:30
Kovid Goyal 6beefbe100 Wire up the FTS input 2022-07-06 19:19:50 +05:30
Kovid Goyal 1b12b9c79e Basic FTS input UI 2022-07-06 19:19:49 +05:30
Kovid Goyal 6deddaa1d3 Run the FTS search with snippets asynchronously 2022-07-06 19:19:49 +05:30
Kovid Goyal 2bbf8e5824 Avoid FTS overhead when restricting to subset
This is needed because the highlight()/snippet() sqlite functions
are very slow with large text
2022-07-06 19:19:49 +05:30
Kovid Goyal cac2a91df9 Allow FTS searches to not return text
Allows efficiently querying for which books match without th eoverhead
of converting the book text to a python string
2022-07-06 19:19:49 +05:30
Kovid Goyal 0a6dc87fcd ... 2022-07-06 19:19:49 +05:30
Kovid Goyal 013018f105 Start work on UI for FTS results 2022-07-06 19:19:49 +05:30
Kovid Goyal a262ef8449 ... 2022-07-06 19:19:49 +05:30
Kovid Goyal cfce9a559d log undecodeable gif images 2022-07-06 19:19:49 +05:30
Kovid Goyal ec0b86de4b Ensure fts is pre-initialized when re-indexing 2022-07-06 19:19:49 +05:30
Kovid Goyal 04f6ba2b64 ... 2022-07-06 19:19:49 +05:30
Kovid Goyal 0f79dbfb47 Improve wording 2022-07-06 19:19:49 +05:30
Kovid Goyal 03d9c2dbc4 Ignore undecodeable GIFs in MOBI files 2022-07-06 19:19:49 +05:30
Kovid Goyal 6d1f2989d1 A re-index button 2022-07-06 19:19:49 +05:30
Kovid Goyal 34cf27727a Add method to re-index FTS 2022-07-06 19:19:49 +05:30
Kovid Goyal 53ae7d76cf Ensure inserting into dirtied formats does not fail in triggers 2022-07-06 19:19:49 +05:30
Kovid Goyal 368bba0ac3 Ensure initialization is thread safe 2022-07-06 19:19:49 +05:30
Kovid Goyal 958625f660 Use a fast/slow indexing control since fast indexing is only appropriate when scanning a backlog 2022-07-06 19:19:48 +05:30
Kovid Goyal 7f503018ba Parallelize db shutdown a bit more 2022-07-06 19:19:48 +05:30
Kovid Goyal 74b218a72a Make shutting down the fts pool more robust
Fixes a deadlock and gives the worker threads a chance to clean exit
2022-07-06 19:19:48 +05:30
Kovid Goyal 89411a763e Name the device manager thread 2022-07-06 19:19:48 +05:30
Kovid Goyal aa66a5e67b name the updates thread 2022-07-06 19:19:48 +05:30
Kovid Goyal efc599f328 shutdown stats update timer on close 2022-07-06 19:19:48 +05:30
Kovid Goyal e40731ab34 Automatically dirty existing books if FTS db is empty
Allows simply deleting the fts db file to force a rescan
2022-07-06 19:19:48 +05:30
Kovid Goyal 72f137c650 Ignore non_HTML spine items when extracting text 2022-07-06 19:19:48 +05:30
Kovid Goyal 69c76996dd Warning label for incomplete indexing 2022-07-06 19:19:48 +05:30
Kovid Goyal abe42f909b Get pool size controls working 2022-07-06 19:19:48 +05:30
Kovid Goyal afcaac89c6 API to get FTS indexing progress 2022-07-06 19:19:48 +05:30
Kovid Goyal 0199dd15ba Rescan all files when indexing is enabled 2022-07-06 19:19:48 +05:30
Kovid Goyal d4e85f06c5 Start work on a GUI for FTS 2022-07-06 19:19:48 +05:30
Kovid Goyal 568e931dff Use a weak reference to the db object in the fts queue thread 2022-07-06 19:19:48 +05:30
Kovid Goyal f65a05cc8f Ensure deleted cache objects are closed
Also ensure close is only called once
2022-07-06 19:19:48 +05:30
Kovid Goyal be83f8bfa6 Ensure cache object is closed at end of tests 2022-07-06 19:19:47 +05:30
Kovid Goyal d52bb3646a Get rid of no longer needed code 2022-07-06 19:19:47 +05:30
Kovid Goyal d441eb32b5 Only print error if FTS is still enabled 2022-07-06 19:19:47 +05:30
Kovid Goyal 251fd7a92c Queue FTS jobs in a separate thread
This allows turning FTS on/off to not block the UI
2022-07-06 19:19:47 +05:30
Kovid Goyal 2b23d75f13 ... 2022-07-06 19:19:47 +05:30
Kovid Goyal 4502569b90 Get FTS search API working 2022-07-06 19:19:47 +05:30
Kovid Goyal 6f3cd9cc44 API for searching the FTS corpus 2022-07-06 19:19:47 +05:30
Kovid Goyal fc80be414c Add a test for shutdown with hung workers 2022-07-06 19:19:47 +05:30
Kovid Goyal f7b47a72fc Implement storing of failure messages in books table 2022-07-06 19:19:47 +05:30
Kovid Goyal 2f2a1063e2 more work 2022-07-06 19:19:47 +05:30
Kovid Goyal 4d2a7a20af Fix failing test 2022-07-06 19:19:47 +05:30
Kovid Goyal a165b34d3c prepare for mocking of fts workers 2022-07-06 19:19:47 +05:30