|
@@ -43,8 +43,19 @@ class Base extends ControllerBase {
|
|
'uuids' => [],
|
|
'uuids' => [],
|
|
'nids' => []
|
|
'nids' => []
|
|
];
|
|
];
|
|
-
|
|
|
|
- // PHRASE QUERY
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // ,---.| ,---.
|
|
|
|
+ // |---'|---.,---.,---.,---.,---. | |. .,---.,---., .
|
|
|
|
+ // | | || ,---|`---.|---' | || ||---'| | |
|
|
|
|
+ // ` ` '` `---^`---'`---' `---\`---'`---'` `---|
|
|
|
|
+ // `---'
|
|
// (to match exact materials names (like "wood-skin"))
|
|
// (to match exact materials names (like "wood-skin"))
|
|
$this->phrase_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
$this->phrase_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
// set parse mode and conjunction
|
|
// set parse mode and conjunction
|
|
@@ -82,7 +93,12 @@ class Base extends ControllerBase {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- // AND QUERY
|
|
|
|
|
|
+
|
|
|
|
+ // ,---. | ,---.
|
|
|
|
+ // |---|,---.,---| | |. .,---.,---., .
|
|
|
|
+ // | || || | | || ||---'| | |
|
|
|
|
+ // ` '` '`---' `---\`---'`---'` `---|
|
|
|
|
+ // `---'
|
|
$this->and_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
$this->and_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
// set parse mode and conjunction
|
|
// set parse mode and conjunction
|
|
$parse_mode = \Drupal::service('plugin.manager.search_api.parse_mode')
|
|
$parse_mode = \Drupal::service('plugin.manager.search_api.parse_mode')
|
|
@@ -191,9 +207,12 @@ class Base extends ControllerBase {
|
|
$this->exactematch_count = count($this->results['nids']);
|
|
$this->exactematch_count = count($this->results['nids']);
|
|
|
|
|
|
|
|
|
|
- //
|
|
|
|
- // OR QUERY
|
|
|
|
- //
|
|
|
|
|
|
+
|
|
|
|
+ // ,---. ,---.
|
|
|
|
+ // | |,---. | |. .,---.,---., .
|
|
|
|
+ // | || | || ||---'| | |
|
|
|
|
+ // `---'` `---\`---'`---'` `---|
|
|
|
|
+ // `---'
|
|
$this->or_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
$this->or_query = $this->index->query(['offset'=>0,'limit'=>10000]);
|
|
|
|
|
|
// Change the parse mode for the search.
|
|
// Change the parse mode for the search.
|