Commit cedd1b1adaefe234c1aa0aeff712b93a8f5d960d

Authored by Andrew Kane
1 parent 21c36dbf

Removed gotcha

Showing 1 changed file with 0 additions and 8 deletions   Show diff stats
@@ -116,14 +116,6 @@ Thanks to Jaroslav Kalistsuk for the [original implementation](https://gist.gith @@ -116,14 +116,6 @@ Thanks to Jaroslav Kalistsuk for the [original implementation](https://gist.gith
116 116
117 ## Elasticsearch Gotchas 117 ## Elasticsearch Gotchas
118 118
119 -### Mappings  
120 -  
121 -When changing the mapping in a model, you must create a new index for the changes to take place. Elasticsearch does not support updates to mappings. For zero downtime, use the `reindex` method above, which creates a new index and swaps it in after it's built. To view the current mapping, use:  
122 -  
123 -```sh  
124 -curl "http://localhost:9200/products/_mapping?pretty=1"  
125 -```  
126 -  
127 ### Inconsistent Scores 119 ### Inconsistent Scores
128 120
129 Due to the distributed nature of Elasticsearch, you can get incorrect results when the number of documents in the index is low. You can [read more about it here](http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/). To fix this, set the search type to `dfs_query_and_fetch`. Alternatively, you can just use one shard with `settings: {number_of_shards: 1}`. 121 Due to the distributed nature of Elasticsearch, you can get incorrect results when the number of documents in the index is low. You can [read more about it here](http://www.elasticsearch.org/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch/). To fix this, set the search type to `dfs_query_and_fetch`. Alternatively, you can just use one shard with `settings: {number_of_shards: 1}`.