summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-03-30 09:16:23 +0300
committerFrederick Muriuki Muriithi2023-03-30 09:16:23 +0300
commitf82c115b0e1a4cc30c2ee7c0a969402b7fd3eebf (patch)
tree92c7bf46fff3b3ec21d61208cbb1c7137ae29a4d
parent6e8c6af7d247dba10f3796bad107685d1b30dc50 (diff)
downloadgn-gemtext-f82c115b0e1a4cc30c2ee7c0a969402b7fd3eebf.tar.gz
Gotchas: Pure `NOT` queries not supported
Add a section in the documentations about things that are not entirely obvious to the user when doing search.
-rw-r--r--topics/xapian-search-queries.gmi22
1 files changed, 22 insertions, 0 deletions
diff --git a/topics/xapian-search-queries.gmi b/topics/xapian-search-queries.gmi
index 0364344..74966f7 100644
--- a/topics/xapian-search-queries.gmi
+++ b/topics/xapian-search-queries.gmi
@@ -90,3 +90,25 @@ Alternatively, this same query may be expressed using kilo or mega suffixes.
Hs:chr4:9130k..9980k species:mouse
Hs:chr4:9.13M..9.98M species:mouse
```
+
+## Gotchas
+
+### Pure `NOT` queries are not supported
+
+Due to
+=> https://xapian.org/docs/apidoc/html/classXapian_1_1QueryParser.html#ae96a58a8de9d219ca3214a5a66e0407eacafc7c8cf7c90adac0fc07d02125aed0 performance reasons,
+pure `NOT` queries are not supported.
+
+A search such as:
+
+```
+NOT author:hager
+```
+
+will fail.
+
+You will need to add something to the query to prevent the error, e.g.
+
+```
+species:mouse NOT author:hager
+```