[TikiWiki-commits] [Git][tikiwiki/tiki][26.x] [BP][ENH] Ability to change index max result window for ElasticSearch

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6913bbaa59d70_2de2f5496647@gitlab-sidekiq-low-urgency-cpu-bound-v2-75c9b85b48-mzd97.mail>

Adrien Mbuya Maloba pushed to branch 26.x at Tiki Wiki CMS Groupware / Tiki


Commits:
1404db36 by Adrien Mbuya Maloba at 2025-11-12T00:37:09+02:00
[BP][ENH] Ability to change index max result window for ElasticSearch
---
* [BP][ENH] Ability to change index max result window for ElasticSearch
---
* [ENH] Ability to change index max result window for ElasticSearch
---
* [ENH] Ability to change index max result window for ElasticSearch

See merge request tikiwiki/tiki!8982

See merge request tikiwiki/tiki!9006

See merge request tikiwiki/tiki!9007

- - - - -


3 changed files:

- lib/core/Search/Elastic/Index.php
- lib/prefs/unified.php
- templates/admin/include_search.tpl


Changes:

=====================================
lib/core/Search/Elastic/Index.php
=====================================
@@ -264,6 +264,12 @@ class Search_Elastic_Index implements Search_Index_Interface, Search_Index_Query
             ],
         ];
 
+        if (! empty($prefs['unified_elastic_index_max_result_window'])) {
+            $definition['index'] = [
+                'max_result_window' => (int) $prefs['unified_elastic_index_max_result_window'],
+            ];
+        }
+
         // optionally removes 's from the end of words
         if ($this->possessiveStemmer) {
             $definition['analysis']['analyzer']['default']['filter'][] = 'english_possessive_stemmer';


=====================================
lib/prefs/unified.php
=====================================
@@ -254,6 +254,14 @@ function prefs_unified_list()
             'description' => tra('In case of Elasticsearch is active and unavailable, use MySQL Full-Text Search as fallback'),
             'default' => 'n',
         ],
+        'unified_elastic_index_max_result_window' => [
+            'name' => tra('Index max result window for ElasticSearch'),
+            'description' => tra('This allows a larger amount of data to be recorded.'),
+            'type' => 'text',
+            'size' => '3',
+            'units' => tra('records'),
+            'default' => '',
+        ],
         'unified_mysql_index_current' => [
             'name' => tra('MySQL full-text search current index'),
             'description' => tra('A new index is created upon rebuilding, and the old one is then destroyed. This setting enables seeing the currently active index.'),


=====================================
templates/admin/include_search.tpl
=====================================
@@ -88,6 +88,7 @@
                             {tr}Elasticsearch is a tiki external service. You should set at least a daily full index rebuild to keep the MySQL index updated in case of Elastic unavailability{/tr}.
                         {/remarksbox}
                         {preference name="unified_elastic_mysql_search_fallback"}
+                        {preference name="unified_elastic_index_max_result_window"}
                     </div>
 
                     <div class="adminoptionboxchild unified_engine_childcontainer mysql">



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1404db3699aee12e46caff48bd91d7537d4b0f12

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1404db3699aee12e46caff48bd91d7537d4b0f12
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.