Commit Graph

151 Commits

Author SHA1 Message Date
Albert S. 22fee1d064 shared: TokenType: FILTER_TAG_ASSIGNED is not a content search token 2023-05-07 17:11:31 +02:00
Albert S. 4c5643e342 cli,shared: Add remove, show and list for tags 2023-05-07 17:11:31 +02:00
Albert S. 4604970f9d shared: Indexer: Add setProgressReportThreshold() 2023-05-01 23:52:45 +02:00
Albert S. 6cd7a92576 shared: Indexer: Fix case where errors did not increase counter 2023-05-01 23:51:00 +02:00
Albert S. 94fbdb5a92 shared: sqlitesearch: Allow filtering by tags 2023-04-10 19:55:24 +02:00
Albert S. abd1b94235 shared: LooqsQuery: Add tag:(),t:() filters to filter by tags 2023-04-10 19:55:24 +02:00
Albert S. d2dcc2f95b shared: sqlitedbservice: Add setTags(),getTagsForPath(),getTags() 2023-04-10 19:55:24 +02:00
Albert S. f324da0369 shared: Begin TagManager 2023-04-10 18:31:22 +02:00
Albert S. a3cfb7ade1 shared: FileScanWorker: Catch LooqsGeneralException for better error msgs 2023-04-02 21:41:35 +02:00
Albert S. 4fe745e858 shared: sqlitedbservice: Begin addTag() 2023-04-02 21:41:35 +02:00
Albert S. a0b95479e2 migrations: Add 5.sql: Tag support 2023-04-02 21:41:35 +02:00
Albert S. 32c2653b0f shared: FileSaver: addFile(): Consider fillExistingContentless 2023-04-02 21:41:35 +02:00
Albert S. a869d677a3 shared: sqlitedbservice: Introduce exec(),execBool(). Refactor 2023-04-02 21:41:35 +02:00
Albert S. 0b829215e5 shared: LooqsQuery: Remove explicit copy constructor 2023-03-12 16:50:37 +01:00
Albert S. 566c4a8c58 tree: Resolve clang-tidy, clazy, compiler warnings 2023-03-12 16:50:25 +01:00
Albert S. ccc4d09b36 shared: FilesSverOptions: Rename members 2023-01-08 17:37:28 +01:00
Albert S. 8298b675aa cli: CommandAdd: Implement --no-content and --fill-content 2023-01-08 17:37:28 +01:00
Albert S. 71789b5b56 shared: SqliteDbService: Add queryFileType() 2023-01-08 17:37:28 +01:00
Albert S. 4b1522b82a Introduce FileSaverOptions to consolidate common parameters 2023-01-08 17:37:28 +01:00
Albert S. 496aefaa09 shared: sqlitesearch: Remove unused var 2022-10-26 13:10:00 +02:00
Albert S. c155d25a37 shared: sqlitesearch: Search trigram index too
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.
2022-10-18 16:06:10 +02:00
Albert S. 583d5babf3 shared: sqlitedbservice: Insert to trigram index too 2022-10-18 16:05:19 +02:00
Albert S. 45659cdc59 shared: migrations: Add 4.sql: Begin trigram index 2022-10-18 16:04:00 +02:00
Albert S. 3022bbdfb5 sqlitesearch: escapeftsArgument: Fix wrong escaping of phrase queries 2022-10-02 19:55:10 +02:00
Albert S. b6ac652ade shared: indexer: Report progress more often
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.
2022-09-23 20:08:00 +02:00
Albert S. 31f0568a87 shared: LimitQueue: Change limit type to int
More consistent with "QQueue::size()" and silences warning
2022-08-28 13:10:39 +02:00
Albert S. 10d61acbd0 shared,gui: SearchResult: remove page vector
Since the previous commit we don't group the results
anymore, making the vector redundant
2022-08-24 00:00:11 +02:00
Albert S. eef0fae137 shared,gui,cli: Fix intra-file ordering for content search results
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.
2022-08-23 23:44:47 +02:00
Albert S. 14730ed208 gui: mainwindow: Add vertical scroll option, default to it
Seems horizontal mode is too unusual according to multiple
feedback.

Allow choosing this the mode in the settings
2022-08-21 22:57:48 +02:00
Albert S. 0c1b57d911 mainwindow: Save/Restore history 2022-08-21 17:48:43 +02:00
Albert S. c0f4087937 sqlitesearch: escapeFtsArgument: Fix handling of '*' prefix search
The * must not be in quotes
2022-08-21 07:55:49 +02:00
Albert S. d900d58f26 shared: migrations: Add 3.sql: Drop potentailly harmful trigger
In [1] it's stated that "If the values "inserted" into the text
columns as part of a 'delete' command are not the same as those
currently stored within the table, the results may be unpredictable."

It's to be assumed only inserting ftsid is unpredictable. We
have no way for a proper delete because files are not immutable
or may have been deleted.

For now the index will contain entries for files that don't exist.
They won't appear in search results as they won't be joined
in the query.

[1] https://www.sqlite.org/fts5.html#the_delete_command
2022-08-14 20:24:21 +02:00
Albert S. ad06497b4b shared: Add LimitQueue which discards oldest entry once limit hit 2022-08-06 09:06:00 +02:00
Albert S. 00abc6bc1b gui, shared: Fix and simplify word extraction regexes
They did not work for chars like '-', causing errors.

We can actually just extract non-space chars for these cases.
2022-08-06 08:57:39 +02:00
Albert S. 076c3c4c7f shared: LooqsQuery: Add implicit AND also for lone words 2022-07-29 10:17:04 +02:00
Albert S. c11fd1a9ff shared: LooqsQuery: Allow constructing from tokens and sort conditions 2022-07-29 10:17:04 +02:00
Albert S. 1849eba190 shared: sqlitesearch: Escape FTS arguments
Most users are not to be expected to be familiar with
sqlite's FTS syntax. It also leads to unnnecessary
arrows in some instances.

So wrap every space separated word in quotes, unless
it's already in quotes. Then we just escape those with
double-quotes.
2022-07-28 17:49:40 +02:00
Albert S. 1da8344295 shared: Adjust queries to db revision 2 2022-07-28 14:00:46 +02:00
Albert S. 78f38fa418 shared: migrations: Add 2.sql: Change to contentless FTS
We never used the content copy we stored. It only wasted space.

Update scheme so we do not store the content anymore. Switch
to contentless FTS approach
2022-07-28 14:00:46 +02:00
Albert S. c03d7da821 shared: common: Remove migration logic from ensureConfigured()
Running migrations is okay for initialization. However, doing
it here might take ages, so the GUI simply would not show up.

Therefore, migration must be done by the CLI or GUI and they
should show that migrations are running
2022-07-28 13:31:13 +02:00
Albert S. 49b57e1740 shared: DBMigrator: Take DatabaseFactory, run vacuum, add error() sig, start() slot 2022-07-28 13:27:37 +02:00
Albert S. 5996971195 shared: common: setPdfViewer(): Fix misplaced QSettings 2022-07-24 23:57:38 +02:00
Albert S. bf1265fe3a shared: Retire Common::findInPath() for builtin Qt function 2022-07-24 18:19:38 +02:00
Albert S. ab064c3e3b gui: mainwindow: Add menu action to open web user manual 2022-07-23 20:16:19 +02:00
Albert S. cc9dae37e5 shared: Indexer: Use isErrorSaveFileResult() to check for non-successful results 2022-07-11 17:14:45 +02:00
Albert S. 64a9638d1e shared: SaveFileResult: Introduce isErrorSaveFileResult() 2022-07-11 17:13:58 +02:00
Albert S. 5ffd7ae97e shared: common: setPdfViewer(): Fix missing spaces between viewer and args 2022-06-29 19:31:40 +02:00
Albert S. 990888efc1 shared: Include license texts as resource 2022-06-29 18:00:05 +02:00
Albert S. 1636e39c5b shared: ParallelDirScanner: Fix missing progress report from top-level scan 2022-06-27 23:11:26 +02:00
Albert S. bda23670e3 shared: ParallelDirScanner: Correct filter to 'NoDotAndDotDot' from 'NoDotDot' 2022-06-27 23:10:53 +02:00