[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [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 | <6913aa47dd5d7_2c7204cf08012c@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f7d69c697-8q2c9.mail> |
Adrien Mbuya Maloba pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki
Commits:
3b7274d6 by Adrien Mbuya Maloba at 2025-11-11T23:19:58+02:00
[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!9003
- - - - -
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/3b7274d62399ed1673a9268b615bff3bb16906e3
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3b7274d62399ed1673a9268b615bff3bb16906e3
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