aboutsummaryrefslogtreecommitdiffstats
path: root/doc/markdown/modules
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-30 18:52:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-04-30 18:52:17 +0100
commit2e530b21009aac48d4861e099679b9c583297909 (patch)
tree16afbae3210ec0548f894c79c420da99422634e3 /doc/markdown/modules
parente9d847811834c16402a3d04cd7ceff70c1a65f60 (diff)
downloadrspamd-2e530b21009aac48d4861e099679b9c583297909.tar.gz
rspamd-2e530b21009aac48d4861e099679b9c583297909.zip
Add documentation for trie module.
Diffstat (limited to 'doc/markdown/modules')
-rw-r--r--doc/markdown/modules/trie.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/markdown/modules/trie.md b/doc/markdown/modules/trie.md
index e69de29bb..997f4d0df 100644
--- a/doc/markdown/modules/trie.md
+++ b/doc/markdown/modules/trie.md
@@ -0,0 +1,39 @@
+# Trie plugin
+
+Trie plugin is designed to search multiple strings within raw messages or text parts
+doing this blazingly fast. In fact, it uses aho-corasic algorithm that performs incredibly
+good even on large texts and many input strings.
+
+This module provides a convenient interface to the search trie structure.
+
+## Configuration
+
+Here is an example of trie configuration:
+
+~~~nginx
+trie {
+ # Each subsection defines a single rule with associated symbol
+ SYMBOL1 {
+ # Define rules in the file (it is *NOT* a map)
+ file = "/some/path";
+ # Raw rules search within the whole undecoded messages
+ raw = true;
+ # If we have multiple occurrences of strings from this rule
+ # then we insert a symbol multiple times
+ multi = true;
+ }
+ SYMBOL2 {
+ patterns = [
+ "pattern1",
+ "pattern2",
+ "pattern3"
+ ]
+ }
+}
+~~~
+
+Despite of the fact that aho-corasic trie is very fast, it supports merely plain
+strings. Moreover, it cannot distinguish words boundaries, for example, a string
+`test` will be found in texts `test`, `tests` or even `123testing`. Therefore, it
+might be used to search some concrete and relatively specific patterns and should
+not be used for words match. \ No newline at end of file