File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ You can use `ignoreUnmapped` to query multiple indices that may not contain the
29
29
``` php
30
30
$query = Query::nested()
31
31
->path('author')
32
- ->query(Query::match()->field('author.name')->field ('Steven'))
32
+ ->query(Query::match()->field('author.name')->query ('Steven'))
33
33
->ignoreUnmapped(true);
34
34
35
35
$searchResult = Book::searchQuery($query)->execute();
@@ -42,7 +42,7 @@ $searchResult = Book::searchQuery($query)->execute();
42
42
``` php
43
43
$query = Query::nested()
44
44
->path('author')
45
- ->query(Query::match()->field('author.name')->field ('Steven'))
45
+ ->query(Query::match()->field('author.name')->query ('Steven'))
46
46
->innerHits(['name' => 'authors']);
47
47
48
48
$searchResult = Book::searchQuery($query)->execute();
@@ -55,7 +55,7 @@ Use `path` to set a path to the nested field you wish to search in:
55
55
``` php
56
56
$query = Query::nested()
57
57
->path('author')
58
- ->query(Query::match()->field('author.name')->field ('Steven'));
58
+ ->query(Query::match()->field('author.name')->query ('Steven'));
59
59
60
60
$searchResult = Book::searchQuery($query)->execute();
61
61
```
@@ -69,7 +69,7 @@ $searchResult = Book::searchQuery($query)->execute();
69
69
// you can make a query using builder
70
70
$query = Query::nested()
71
71
->path('author')
72
- ->query(Query::match()->field('author.name')->field ('Steven'));
72
+ ->query(Query::match()->field('author.name')->query ('Steven'));
73
73
74
74
// or you can define a raw query
75
75
$query = [
You can’t perform that action at this time.
0 commit comments