Commit 5e591bff55a02a82d5311ddd4359ab78fbbb49c2
1 parent
dd2486d7
Exists in
master
and in
21 other branches
Updated readme
Showing
1 changed file
with
6 additions
and
10 deletions
Show diff stats
README.md
@@ -13,6 +13,10 @@ Searchkick provides sensible search defaults out of the box. It handles: | @@ -13,6 +13,10 @@ Searchkick provides sensible search defaults out of the box. It handles: | ||
13 | - extra whitespace - `dishwasher` matches `dish washer` | 13 | - extra whitespace - `dishwasher` matches `dish washer` |
14 | - misspellings - `zuchini` matches `zucchini` | 14 | - misspellings - `zuchini` matches `zucchini` |
15 | 15 | ||
16 | +### Make Searches Better Over Time | ||
17 | + | ||
18 | +Use analytics on search conversions to improve results | ||
19 | + | ||
16 | ### Zero Downtime Changes | 20 | ### Zero Downtime Changes |
17 | 21 | ||
18 | Elasticsearch has a feature called aliases that allows you to change mappings with no downtime. | 22 | Elasticsearch has a feature called aliases that allows you to change mappings with no downtime. |
@@ -43,7 +47,7 @@ Thanks to Jaroslav Kalistsuk for the [original source](https://gist.github.com/j | @@ -43,7 +47,7 @@ Thanks to Jaroslav Kalistsuk for the [original source](https://gist.github.com/j | ||
43 | 47 | ||
44 | Clinton Gormley also has a [good post](http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/) on this. | 48 | Clinton Gormley also has a [good post](http://www.elasticsearch.org/blog/changing-mapping-with-zero-downtime/) on this. |
45 | 49 | ||
46 | -## Gotchas | 50 | +## Elasticsearch Gotchas |
47 | 51 | ||
48 | ### Mappings | 52 | ### Mappings |
49 | 53 | ||
@@ -55,15 +59,7 @@ curl http://localhost:9200/books/_mapping | @@ -55,15 +59,7 @@ curl http://localhost:9200/books/_mapping | ||
55 | 59 | ||
56 | ### Low Number of Documents | 60 | ### Low Number of Documents |
57 | 61 | ||
58 | -By default, Tire creates an index on 5 shards - even in development. With a low number of documents, you will get inconsistent relevance scores by default. There are two different ways to fix this: | ||
59 | - | ||
60 | -- Use one shard | ||
61 | - | ||
62 | -```ruby | ||
63 | -settings: {number_of_shards: 1} | ||
64 | -``` | ||
65 | - | ||
66 | -- Set the search type to `dfs_query_and_fetch`. More about [search types here](http://www.elasticsearch.org/guide/reference/api/search/search-type/). | 62 | +By default, Tire creates an index on 5 shards - even in development. With a low number of documents, you will get inconsistent relevance scores by default. 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 `settings: {number_of_shards: 1}`. |
67 | 63 | ||
68 | ## Installation | 64 | ## Installation |
69 | 65 |