summaryrefslogtreecommitdiff
path: root/src/engine/VyOSElasticModernFulltextStorageEngine.php
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@andamasov.com>2026-05-23 14:23:13 +0300
committerGitHub <noreply@github.com>2026-05-23 14:23:13 +0300
commit132217de05911823c2fcec2785fc38918442081c (patch)
treee5a11c374fc4f8d8b3d30e144648a39d3de016f2 /src/engine/VyOSElasticModernFulltextStorageEngine.php
parentebc6bcf1466f7555988df9063dd86e834de1b9aa (diff)
parent67d619a782eef8df6437525c45a63c9485c13a6a (diff)
downloadphorge-elasticsearch-modern-132217de05911823c2fcec2785fc38918442081c.tar.gz
phorge-elasticsearch-modern-132217de05911823c2fcec2785fc38918442081c.zip
Merge pull request #7 from vyos/task/e4-buildtypefilter
E4: Add buildTypeFilter() helper
Diffstat (limited to 'src/engine/VyOSElasticModernFulltextStorageEngine.php')
-rw-r--r--src/engine/VyOSElasticModernFulltextStorageEngine.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/engine/VyOSElasticModernFulltextStorageEngine.php b/src/engine/VyOSElasticModernFulltextStorageEngine.php
index e21021f..316a02b 100644
--- a/src/engine/VyOSElasticModernFulltextStorageEngine.php
+++ b/src/engine/VyOSElasticModernFulltextStorageEngine.php
@@ -40,6 +40,14 @@ abstract class VyOSElasticModernFulltextStorageEngine
return '/_search';
}
+ public function buildTypeFilter(array $types) {
+ return array(
+ 'terms' => array(
+ 'documentType' => array_values($types),
+ ),
+ );
+ }
+
public function getEngineIdentifier() {
return 'elasticsearch-modern';
}