Commit 689477484d0447ebdb0ce4d45a6047ea03ee053f
1 parent
ee99a8c0
Exists in
master
and in
21 other branches
Version bump to 1.5.0
Showing
3 changed files
with
10 additions
and
12 deletions
Show diff stats
CHANGELOG.md
README.md
... | ... | @@ -94,9 +94,7 @@ where: { |
94 | 94 | aisle_id: {not: [25, 30]}, # not in |
95 | 95 | user_ids: {all: [1, 3]}, # all elements in array |
96 | 96 | category: /frozen .+/, # regexp |
97 | - or: [ | |
98 | - [{in_stock: true}, {backordered: true}] | |
99 | - ] | |
97 | + _or: [{in_stock: true}, {backordered: true}] | |
100 | 98 | } |
101 | 99 | ``` |
102 | 100 | |
... | ... | @@ -907,9 +905,9 @@ Also supports [additional options](https://www.elastic.co/guide/en/elasticsearch |
907 | 905 | City.search "san", boost_by_distance: {field: :location, origin: {lat: 37, lon: -122}, function: :linear, scale: "30mi", decay: 0.5} |
908 | 906 | ``` |
909 | 907 | |
910 | -### Geo Shapes [master] | |
908 | +### Geo Shapes | |
911 | 909 | |
912 | -You can also pass through complex or varied shapes as GeoJSON objects. | |
910 | +You can also index and search geo shapes. | |
913 | 911 | |
914 | 912 | ```ruby |
915 | 913 | class City < ActiveRecord::Base |
... | ... | @@ -928,9 +926,9 @@ class City < ActiveRecord::Base |
928 | 926 | end |
929 | 927 | ``` |
930 | 928 | |
931 | -The `geo_shape` hash is passed through to elasticsearch without modification. Please see the [geo_shape data type documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) for options. | |
929 | +The `geo_shape` hash is passed through to Elasticsearch without modification. Please see the [geo shape documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) for options. | |
932 | 930 | |
933 | -Any geospatial data type can be held in the index or give as a search query. It is up to you to ensure that it is a valid geoJSON representation. The possible shapes are: | |
931 | +Any geospatial data type can be held in the index or give as a search query. It is up to you to ensure that it is a valid GeoJSON representation. Possible shapes are: | |
934 | 932 | |
935 | 933 | * **point**: single lat/lon pair |
936 | 934 | * **multipoint**: array of points |
... | ... | @@ -940,11 +938,11 @@ Any geospatial data type can be held in the index or give as a search query. It |
940 | 938 | * **multipolygon**: array of polygons |
941 | 939 | * **envelope**: a bounding box defined by top left and bottom right points |
942 | 940 | * **circle**: a bounding circle defined by center point and radius |
943 | -* **geometrycollection**: an array of separate geoJSON objects possibly of various types | |
941 | +* **geometrycollection**: an array of separate GeoJSON objects possibly of various types | |
944 | 942 | |
945 | 943 | See the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) for details. GeoJSON coordinates are usually given as an array of `[lon, lat]` points but searchkick can also take objects with `lon` and `lat` keys. |
946 | 944 | |
947 | -Once a geo_shape index is established, you can include a geo_shape filter in any search. This also takes a geoJSON shape, and will return a list of items based on their overlap with that shape. | |
945 | +Once a geo shape index is established, you can include a geo shape filter in any search. This also takes a GeoJSON shape and will return a list of items based on their overlap with that shape. | |
948 | 946 | |
949 | 947 | Find shapes (of any kind) intersecting with the query shape |
950 | 948 | |
... | ... | @@ -964,7 +962,7 @@ Not touching the query shape |
964 | 962 | City.search "san", where: {bounds: {geo_shape: {type: "envelope", relation: "disjoint", coordinates: [{lat: 38, lon: -123}, {lat: 37, lon: -122}]}}} |
965 | 963 | ``` |
966 | 964 | |
967 | -Containing the query shape (ElasticSearch 2.2+) | |
965 | +Containing the query shape (Elasticsearch 2.2+) | |
968 | 966 | |
969 | 967 | ```ruby |
970 | 968 | City.search "san", where: {bounds: {geo_shape: {type: "envelope", relation: "contains", coordinates: [{lat: 38, lon: -123}, {lat: 37, lon: -122}]}}} | ... | ... |
lib/searchkick/version.rb