Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit 9b3f364

Browse files
committed
review fixes
1 parent 2b172ed commit 9b3f364

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ whereExists($field) | whereExists('unemployed') | Checks if a value is defined.
399399
whereNotExists($field) | whereNotExists('unemployed') | Checks if a value isn't defined.
400400
whereRegexp($field, $value, $flags = 'ALL') | whereRegexp('name.raw', 'A.+') | Filters records according to a given regular expression. [Here](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-regexp-query.html#regexp-syntax) you can find more about syntax.
401401
whereGeoDistance($field, $value, $distance) | whereGeoDistance('location', [-70, 40], 1000) | Filters records according to given point and distance from it. [Here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html) you can find more about syntax.
402-
whereGeoBoundingBox($field, array $value) | whereGeoBoundingBox('location', ["top_left" => [-74.1, 40.73], "bottom_right" => [-71.12, 40.01]]) | Filters records within given boundings. [Here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html) you can find more about syntax.
402+
whereGeoBoundingBox($field, array $value) | whereGeoBoundingBox('location', ['top_left' => [-74.1, 40.73], 'bottom_right' => [-71.12, 40.01]]) | Filters records within given boundings. [Here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html) you can find more about syntax.
403403
whereGeoPolygon($field, array $points) | whereGeoPolygon('location', [[-70, 40],[-80, 30],[-90, 20]]) | Filters records within given polygon. [Here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-polygon-query.html) you can find more about syntax.
404404

405405
In most cases it's better to use raw fields to filter records, i.e. not analyzed fields.

src/Builders/FilterBuilder.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,11 @@ public function when($value, callable $callback, callable $default = null)
126126
}
127127

128128
/**
129-
* https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html
129+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html
130+
*
130131
* @param string $field
131-
* @param string $value
132-
* @param array|string $distance
132+
* @param string|array $value
133+
* @param int|string $distance
133134
* @return $this
134135
*/
135136
public function whereGeoDistance($field, $value, $distance)
@@ -140,7 +141,8 @@ public function whereGeoDistance($field, $value, $distance)
140141
}
141142

142143
/**
143-
* https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html
144+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html
145+
*
144146
* @param string $field
145147
* @param array $value
146148
* @return $this
@@ -153,7 +155,8 @@ public function whereGeoBoundingBox($field, array $value)
153155
}
154156

155157
/**
156-
* https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-polygon-query.html
158+
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-polygon-query.html
159+
*
157160
* @param string $field
158161
* @param array $points
159162
* @return $this

tests/ElasticEngineTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ public function test_if_the_search_method_with_specified_whereGeoBoundingBox_cla
673673
[
674674
'geo_bounding_box' => [
675675
'location' => [
676-
"top_left" => [-74.1, 40.73],
677-
"bottom_right" => [-71.12, 40.01]
676+
'top_left' => [-74.1, 40.73],
677+
'bottom_right' => [-71.12, 40.01]
678678
]
679679
]
680680
]
@@ -691,8 +691,8 @@ public function test_if_the_search_method_with_specified_whereGeoBoundingBox_cla
691691
$builder = (new SearchBuilder($model, 'flat'))->whereGeoBoundingBox(
692692
'location',
693693
[
694-
"top_left" => [-74.1, 40.73],
695-
"bottom_right" => [-71.12, 40.01]
694+
'top_left' => [-74.1, 40.73],
695+
'bottom_right' => [-71.12, 40.01]
696696
]
697697
);
698698

0 commit comments

Comments
 (0)