From ca1a515738c17fd70988ff2cbe15b7a90a41e15e Mon Sep 17 00:00:00 2001 From: Yugi Date: Sun, 11 Aug 2024 17:21:09 -0400 Subject: [PATCH] Allow stopwords, shingle analyzer --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c7723da..54a7236 100644 --- a/main.py +++ b/main.py @@ -51,9 +51,9 @@ def create_and_update_index(index_name, documents, fields_to_not_index): "filter": [ "lowercase", "decimal_digit", - "arabic_stop", "arabic_normalization", - "arabic_stemmer" + "arabic_stemmer", + "shingle" ] } }, @@ -63,6 +63,7 @@ def create_and_update_index(index_name, documents, fields_to_not_index): "type": "shingle", "min_shingle_size": 2, "max_shingle_size": 3, + "output_unigrams": True }, "synonyms_filter": { "type": "synonym",