Commit 0c85e9123e39bf66af6d4930827fa06abc9d9d01
1 parent
6541e44d
Exists in
master
and in
21 other branches
Added section on nested data
Showing
1 changed file
with
10 additions
and
2 deletions
Show diff stats
README.md
@@ -1133,7 +1133,7 @@ products = | @@ -1133,7 +1133,7 @@ products = | ||
1133 | end | 1133 | end |
1134 | ``` | 1134 | ``` |
1135 | 1135 | ||
1136 | -### Multi Search | 1136 | +## Multi Search |
1137 | 1137 | ||
1138 | To batch search requests for performance, use: | 1138 | To batch search requests for performance, use: |
1139 | 1139 | ||
@@ -1147,7 +1147,7 @@ Then use `fresh_products` and `frozen_products` as typical results. | @@ -1147,7 +1147,7 @@ Then use `fresh_products` and `frozen_products` as typical results. | ||
1147 | 1147 | ||
1148 | **Note:** Errors are not raised as with single requests. Use the `error` method on each query to check for errors. Also, if you use the `below` option for misspellings, misspellings will be disabled. | 1148 | **Note:** Errors are not raised as with single requests. Use the `error` method on each query to check for errors. Also, if you use the `below` option for misspellings, misspellings will be disabled. |
1149 | 1149 | ||
1150 | -### Multiple Indices | 1150 | +## Multiple Indices |
1151 | 1151 | ||
1152 | Search across multiple indices with: | 1152 | Search across multiple indices with: |
1153 | 1153 | ||
@@ -1161,6 +1161,14 @@ Boost specific indices with: | @@ -1161,6 +1161,14 @@ Boost specific indices with: | ||
1161 | indices_boost: {Category => 2, Product => 1} | 1161 | indices_boost: {Category => 2, Product => 1} |
1162 | ``` | 1162 | ``` |
1163 | 1163 | ||
1164 | +## Nested Data | ||
1165 | + | ||
1166 | +To query nested data, use dot notation. | ||
1167 | + | ||
1168 | +```ruby | ||
1169 | +User.search "*", where: {"address.zip_code" => 12345} | ||
1170 | +``` | ||
1171 | + | ||
1164 | ## Reference | 1172 | ## Reference |
1165 | 1173 | ||
1166 | Reindex one record | 1174 | Reindex one record |