[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Ability to change index max result window for ElasticSearch
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6911fa206816b_2c9f36e82860@gitlab-sidekiq-low-urgency-cpu-bound-v2-fc49d4986-l2dck.mail> |
Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
fff7a2f6 by Adrien Mbuya Maloba at 2025-11-10T14:35:46+00:00
[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
- - - - -
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
=====================================
@@ -274,6 +274,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/fff7a2f6ae6727f69c2622b69d5925b162721689
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fff7a2f6ae6727f69c2622b69d5925b162721689
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