What's New in Percolator

660d1a296a8badddc4c44fb2c7eef011?s=47 Luca Cavanna
October 02, 2013
12k

What's New in Percolator

Presentation given at the BeLux elasticsearch meetup on October 2nd 2013 in Brussels

660d1a296a8badddc4c44fb2c7eef011?s=128

Luca Cavanna

October 02, 2013
Tweet

Transcript

  1. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited What’s New in Percolator? @lucacavanna Elasticsearch User Group BeLux
  2. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda
  3. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda What is the percolator? What do people use it for? How does it work? Why did it need a redesign? What was changed exactly?
  4. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda What is the percolator? What do people use it for? How does it work? Why did it need a redesign? What was changed exactly?
  5. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda What is the percolator? What do people use it for? How does it work? Why did it need a redesign? What was changed exactly?
  6. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda What is the percolator? What do people use it for? How does it work? Why did it need a redesign? What was changed exactly?
  7. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Agenda What is the percolator? What do people use it for? How does it work? Why did it need a redesign? What has changed?
  8. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Perco ...what?
  9. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited We are used to docs...
  10. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited PUT /twitter/tweet/1 -d ' { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } ' We are used to docs...
  11. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited ...and queries
  12. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited ...and queries GET /_search -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  13. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s do the opposite
  14. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s index a query...
  15. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited PUT /_percolator/twitter/es-tweets Let’s index a query... verb (index request)
  16. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited PUT /_percolator/twitter/es-tweets Let’s index a query... reserved index
  17. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited PUT /_percolator/twitter/es-tweets Let’s index a query... index to register query against
  18. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited PUT /_percolator/twitter/es-tweets Let’s index a query... query identifier
  19. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s index a query... PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } ' the query
  20. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate ...and percolate a doc verb (percolate request)
  21. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate ...and percolate a doc index to percolate against (needs to exist although empty)
  22. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate ...and percolate a doc percolate api endpoint
  23. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } } ' ...and percolate a doc document
  24. { "ok": "true", "matches": ["es-tweets"] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited ...and percolate a doc # 200 OK matching queries
  25. { "ok": "true", "matches": ["es-tweets"] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited ...and percolate a doc # 200 OK PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  26. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Why would you do that?
  27. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited
  28. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let me know when it’s coming!
  29. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited weather forecast alerts PUT /_percolator/forecast/summer -d ' { "query": { “range”: { “max” : { “gte” : 30 } } } } '
  30. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited weather forecast alerts GET /forecast/type/_percolate -d ' { “doc” : { "date": "2013-07-25", "wind": 1, "min": "22", "max": "32", "rain": 0 } } '
  31. { "ok": "true", "matches": ["summer"] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited # 200 OK weather forecast alerts
  32. { "ok": "true", "matches": ["summer"] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited # 200 OK the summer is coming! weather forecast alerts
  33. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to:
  34. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to: Price monitoring News alerts Stock alerts Logs monitoring
  35. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to: Price monitoring News alerts Stock alerts Logs monitoring
  36. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to: Price monitoring News alerts Stock alerts Logs monitoring
  37. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to: Price monitoring News alerts Stock alerts Logs monitoring
  38. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Alerting applies also to: Price monitoring News alerts Stock alerts Logs monitoring ...and many more
  39. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited
  40. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited
  41. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited
  42. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How do I make my ads better?
  43. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Store users queries PUT /_percolator/ads/user1 -d ' { "query": { “match”: { “text” : “iphone subscription”, “operator” : “and” } } } '
  44. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s percolate the ad... GET /ads/apple/_percolate -d ' { “doc” : { "text": "iPhone from 1 euro", "url": “http://www.myads.com/myads” } } '
  45. { "ok": "true", "matches": [] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited # 200 OK No query matches ...and get feedback back
  46. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s modify the ad... GET /ads/apple/_percolate -d ' { “doc” : { "text": “iPhone subscription from 1 euro", "url": “http://www.myads.com/myads” } } '
  47. { "ok": "true", "matches": ["user1"] } Copyright Elasticsearch 2013. Copying,

    publishing and/or distributing without written permission is strictly prohibited # 200 OK How many people would the updated ad reach? ...and get feedback back
  48. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Enhance documents
  49. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Store articles patterns PUT /_percolator/article/apple -d ' { "query": { “multi_match”: { “fields” : [“title”,”content”], “query” : “ios apple iphone ipad” } } } '
  50. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited percolate a new article GET /article/tech/_percolate -d ' { “doc” : { "title": "iOS 7 released", "content": “iOS 7, the seventh major iteration of the mobile platform, includes more than 200 new features, including a brand new bright and colorful user interface.” } } '
  51. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited percolate a new article { "ok": "true", "matches": ["apple"] } GET /article/tech/_percolate -d ' { “doc” : { "title": "iOS 7 released", "content": “iOS 7, the seventh major iteration of the mobile platform, includes more than 200 new features, including a brand new bright and colorful user interface.” } } '
  52. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited index the enriched article PUT /article/tech/1 -d ' { "title": "iOS 7 released", "content": “iOS 7, the seventh major iteration of the mobile platform, includes more than 200 new features, including a brand new bright and colorful user interface.”, “tag” : “apple” } '
  53. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work?
  54. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/_mapping special mapping
  55. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/_mapping { "_default_" : { "properties" : { "query" : { "type" : "object", "enabled" : false } } } } special mapping
  56. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/_mapping { "_default_" : { "properties" : { "query" : { "type" : "object", "enabled" : false } } } } special mapping queries are only stored
  57. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work?
  58. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work? All queries are loaded in memory Each doc is indexed in memory All queries get executed against it Execution time linear (# of queries) The memory index gets cleaned up
  59. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work? All queries are loaded in memory Each doc is indexed in memory All queries get executed against it Execution time linear (# of queries) The memory index gets cleaned up
  60. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work? All queries are loaded in memory Each doc is indexed in memory All queries get executed against it Execution time linear (# of queries) The memory index gets cleaned up
  61. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work? All queries are loaded in memory Each doc is indexed in memory All queries get executed against it Execution time linear to # of queries The memory index gets cleaned up
  62. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How does it work? All queries are loaded in memory Each doc is indexed in memory All queries get executed against it Execution time linear to # of queries The memory index gets cleaned up
  63. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Query metadata PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  64. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Query metadata PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } }, “user_id”: “lucacavanna” } '
  65. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Query metadata PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } }, “user”: { “name” : “Luca Cavanna”, “nick” : “lucacavanna” } } '
  66. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Retrieve query by id GET /_percolator/twitter/es-tweets
  67. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/twitter/es-tweets { "query": { "match": { "tweet": "elasticsearch" } }, “user”: { “name” : “Luca Cavanna”, “nick” : “lucacavanna” } } Retrieve query by id
  68. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate -d ' { “doc” : { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna" }, “query” : { “term” : {“user.nick” : “lucacavanna”} } } ' Drill down
  69. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate -d ' { “doc” : { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna" }, “query” : { “term” : {“user.nick” : “lucacavanna”} } } ' Drill down restricts the # of queries to run
  70. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/_settings special settings
  71. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /_percolator/_settings { "_percolator" : { "settings" : { "index.version.created" : "900599", "index.number_of_replicas" : "0", "index.number_of_shards" : "1", "index.auto_expand_replicas" : "0-all" } } } special settings
  72. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Node 1 _percolator 0P
  73. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Node 1 _percolator 0P Node 2 _percolator 0R
  74. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Node 1 _percolator 0P Node 2 _percolator 0R Node 3 _percolator 0R
  75. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Looks pretty cool, doesn’t it?
  76. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited What’s wrong with it then?
  77. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited A single shard doesn’t scale!
  78. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited What has changed in master (1.0)?
  79. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s index a query... PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  80. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s index a query... PUT /anyindex/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } ' any index can contain queries to percolate against
  81. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Let’s index a query... PUT /anyindex/_percolator/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } } } ' reserved type for queries to percolate against
  82. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited How many shards now?
  83. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited As many as you like!
  84. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited This can actually scale!
  85. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /index1,index2/tweet/_percolate -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } } ' Multi-index support
  86. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /alias1/tweet/_percolate -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } } ' Full alias support
  87. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Routing support PUT /anyindex/_percolator/id?routing=user1 -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  88. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate?routing=user1 -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } } Routing support
  89. { "took": 9, “_shards” : { “total” : 5, “successful”

    : 5, “failed” : 0 }, “count” : 1, "matches": [ { “_index” : “index1”, “_id” : “es-tweets” } ] } Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission is strictly prohibited New percolate response
  90. { "took": 9, “_shards” : { “total” : 5, “successful”

    : 5, “failed” : 0 }, “count” : 1, "matches": [ { “_index” : “index1”, “_id” : “es-tweets” } ] } Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission is strictly prohibited New percolate response
  91. { "took": 9, “_shards” : { “total” : 5, “successful”

    : 5, “failed” : 0 }, “count” : 1, "matches": [ { “_index” : “index1”, “_id” : “es-tweets” } ] } Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission is strictly prohibited New percolate response
  92. { "took": 9, “_shards” : { “total” : 5, “successful”

    : 5, “failed” : 0 }, “count” : 1, "matches": [ { “_index” : “index1”, “_id” : “es-tweets” } ] } Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission is strictly prohibited New percolate response
  93. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Some brand new features
  94. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/1/_percolate Percolate existing doc
  95. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/1/_percolate Percolate existing doc 1) index that contains the document
  96. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/1/_percolate Percolate existing doc 1) index that contains the document 2) and the queries (_percolator type)
  97. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/1/_percolate Percolate existing doc type & id of the existing doc
  98. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/1/_percolate? percolate_index=my-percolator Percolate existing doc separate index where the queries are
  99. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate/count -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna", "name": "Luca Cavanna", "date": "2013-10-02", "rt": 5, "loc": { ! "lat": 13.4, ! "lon": 52.5 } } } ' Percolate count api
  100. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Percolate count api { "took": 9, “_shards” : { “total” : 5, “successful” : 5, “failed” : 0 }, “count” : 1 }
  101. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate -d ' { “doc” : { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna" }, “filter” : { “term” : {“user.nick” : “lucacavanna”} } } ' Support for filters
  102. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Highlighting PUT /twitter/_percolator/1 -d ' { "query": { "match": { "tweet": "elasticsearch" } } } '
  103. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Highlighting PUT /twitter/_percolator/1 -d ' { "query": { "match": { "tweet": "elasticsearch" } } } ' PUT /twitter/_percolator/2 -d ' { "query": { "match": { "tweet": "awesome" } } } '
  104. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited GET /twitter/tweet/_percolate -d ' { “doc”: { "tweet": "#elasticsearch is AWESOME" }, “highlight”: { “fields” : { “tweet”:{} } }, “size” : 5 } ' Highlighting
  105. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited { ......... “matches”: [ { “_index” : “twitter”, “_id” : “1”, "tweet": "#<em>elasticsearch</em> is AWESOME" }, { “_index” : “twitter”, “_id” : “2”, "tweet": "#elasticsearch is <em>AWESOME</em>" } ] } ' Highlighting
  106. PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet":

    "elasticsearch" } }, “user”: { “name” : “Luca Cavanna”, “nick” : “lucacavanna” } } ' Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission is strictly prohibited Basic scoring
  107. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Basic scoring PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } }, “user”: { “name” : “Luca Cavanna”, “nick” : “lucacavanna” } } ' GET /twitter/tweet/_percolate -d ' { “doc” : { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna" }, “query” : { “match” : {“user.name” : “Luca”} } } '
  108. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Basic scoring PUT /_percolator/twitter/es-tweets -d ' { "query": { "match": { "tweet": "elasticsearch" } }, “user”: { “name” : “Luca Cavanna”, “nick” : “lucacavanna” } } ' GET /twitter/tweet/_percolate -d ' { “doc” : { "tweet": "#elasticsearch is AWESOME", "nick": "@lucacavanna" }, “query” : { “match” : {“user.name” : “Luca”} } } ' How well does it match?
  109. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Sorting Sort by score Only return the score Limit number of results Further improvements
  110. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Sorting Sort by score Only return the score Limit number of results Further improvements
  111. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Sorting Sort by score Only return the score Limit number of matches Further improvements
  112. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Sorting Sort by score Only return the score Limit number of matches Boosting based on metadata
  113. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Sorting Sort by score Only return the score Limit number of matches Boosting based on metadata Further improvements
  114. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Multi percolate GET /_mpercolate
  115. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited Multi percolate GET /_mpercolate {“percolate” : {“index”:”twitter”, “type”:”tweet”} } {“doc”: {“text”:“elasticsearch is AWESOME!”} } {“percolate” : {“index”:”twitter”, “type”:”tweet”, “id”:”id1”} } {} {“count” : {“index”:”twitter”, “type”:”tweet”} } {“doc”: {“text”:“elasticsearch rocks!”} } {“count” : {“index”:”twitter”, “type”:”tweet”, “id”:”id2”} } {}
  116. Copyright Elasticsearch 2013. Copying, publishing and/or distributing without written permission

    is strictly prohibited www.elasticsearch.org