Skip to content

Commit 13d35a0

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev-l8
2 parents e79fd0b + 6c42ed0 commit 13d35a0

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed

README.md

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ Next, [Configuration](https://elasticsearch.pdphilip.com/#configuration)
4848

4949
---
5050

51-
# New in version 3
52-
53-
- [whereExact()](https://elasticsearch.pdphilip.com/es-specific#where-exact)
54-
- [wherePhrase()](https://elasticsearch.pdphilip.com/es-specific#where-phrase)
55-
- [whereNestedObject()](https://elasticsearch.pdphilip.com/es-specific#where-nested-object)
56-
- [whereNotNestedObject()](https://elasticsearch.pdphilip.com/es-specific#where-not-nested-object)
57-
- [firstOrCreate()](https://elasticsearch.pdphilip.com/saving-models#first-or-create)
58-
- [firstOrCreateWithoutRefresh()](https://elasticsearch.pdphilip.com/saving-models#first-or-create-without-refresh)
59-
- [whereNested()](https://elasticsearch.pdphilip.com/querying-models#where-nested)
60-
61-
---
62-
6351
# Documentation Links
6452

6553
## Getting Started
@@ -90,3 +78,38 @@ Next, [Configuration](https://elasticsearch.pdphilip.com/#configuration)
9078

9179
- [Migrations](https://elasticsearch.pdphilip.com/migrations)
9280
- [Re-indexing Process](https://elasticsearch.pdphilip.com/re-indexing)
81+
82+
---
83+
84+
# New in Version 3
85+
86+
### Nested Queries [(see)](https://elasticsearch.pdphilip.com/nested-queries)
87+
88+
This update introduces support for querying, sorting and filtering nested data
89+
90+
- [Nested Object Queries](https://elasticsearch.pdphilip.com/nested-queries#where-nested-object)
91+
- [Order By Nested](https://elasticsearch.pdphilip.com/nested-queries#order-by-nested-field)
92+
- [Filter Nested Values](https://elasticsearch.pdphilip.com/nested-queries#filtering-nested-values): Filters nested values of the parent collection
93+
94+
### New `Where` clauses
95+
96+
- [Phrase Matching](https://elasticsearch.pdphilip.com/es-specific#where-phrase): The enhancement in phrase matching capabilities allows for refined search precision, facilitating the targeting of exact word sequences within textual
97+
fields, thus improving search specificity
98+
and relevance.
99+
- [Exact Matching](https://elasticsearch.pdphilip.com/es-specific#where-exact): Strengthening exact match queries enables more stringent search criteria, ensuring the retrieval of documents that precisely align with specified parameters.
100+
101+
### Sorting Enhancements
102+
103+
- [Ordering with ES features](https://elasticsearch.pdphilip.com/ordering-and-pagination#extending-ordering-for-elasticsearch-features): Includes modes and missing values for sorting fields.
104+
- [Order by Geo Distance](https://elasticsearch.pdphilip.com/ordering-and-pagination#order-by-geo-distance)
105+
106+
### Saving Updates
107+
108+
- [First Or Create](https://elasticsearch.pdphilip.com/saving-models#first-or-create)
109+
- [First Or Create without Refresh](https://elasticsearch.pdphilip.com/saving-models#first-or-create-without-refresh)
110+
111+
### Grouped Queries
112+
113+
- [Grouped Queries](https://elasticsearch.pdphilip.com/querying-models#grouped-queries): Queries can be grouped allowing multiple conditions to be nested within a single query block.
114+
115+
---

src/DSL/QueryBuilder.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ public function buildParams($index, $wheres, $options = [], $columns = [], $_id
111111
$params = $this->_parseFilterParameter($params, self::$filter);
112112
self::$filter = [];
113113
}
114+
115+
// dd($params);
114116

115117
return $params;
116118
}
@@ -373,9 +375,14 @@ private function _parseCondition($condition, $parentField = null): array
373375
break;
374376
case 'innerNested':
375377
$options = $this->_buildNestedOptions($operand['options'], $field);
378+
if (!$options) {
379+
$options['size'] = 100;
380+
}
376381
$query = ParameterBuilder::matchAll()['query'];
377382
if (!empty($operand['wheres'])) {
378383
$query = $this->_convertWheresToDSL($operand['wheres'], $field);
384+
// $options['query'] = $query;
385+
// dd($query);
379386
}
380387
$queryPart = [
381388
'nested' => [

0 commit comments

Comments
 (0)