summaryrefslogtreecommitdiffstats
path: root/core/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-02-16 22:19:44 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-01 10:21:44 -0800
commit6434ad262887a473abd410fd8011bba1291663d6 (patch)
tree6d0fab7c898c7daf0ab2fe53b2977d94cef60403 /core/CMakeLists.txt
parent41aae1aebe1aea4db58d61a171f7ecd76b6282d7 (diff)
downloadsubsurface-6434ad262887a473abd410fd8011bba1291663d6.tar.gz
filter: add fulltext filtering code
Add code that indexes all words of a dive and provides searching for words. A query is represented by the FullTextQuery class, which can be initialized by assigning a string to it. It is basically a list of words. The result of a search is stored in the FullTextResult class, which is a list of dives. The actual indexing and searching is implemented in the FullText class. However, this class is not exported because the interface is partially accessible to C. Notably, the reloading of the fulltext index is done from the C core. Currently, the indexing and searching is totally unoptimized. In a ~4000 dives test-log searches typically took single-digit ms times. There is ample room for optimization (e.g. when searching for multiple words, chose the words with few dives first and when down to a few dives, check them individually). The words of each dive are tokenized and uppercased and cached with the dive. A pointer to these words is stashed in the dive structure. For now, compile only on desktop. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/CMakeLists.txt')
-rw-r--r--core/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 24df1854b..d3f1401f1 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -88,6 +88,8 @@ set(SUBSURFACE_CORE_LIB_SRCS
file.h
format.cpp
format.h
+ fulltext.cpp
+ fulltext.h
gas.c
gas.h
gas-model.c