0
99 Problems, ButThe Search Ain’t OneAndrei Zmievski • ConFoo •!Mar 9, 2011
who am i? curl http://localhost:9200/speaker/info/andrei{“name”:       “Andrei Zmievski”, “works”:      “Analog Co-op”, “p...
what is elasticsearch?a search engine for the NoSQL generation  domain-driven  distributed  RESTful  Hitchhiker’s Guide to...
document modeldocument-orientedJSON-basedschema-free
enginebased on Lucenemulti-tenancydistributed, out of the box
3 easy steps
1. index           !"#$%&()*+%,--./00$1!2$,13-/45660!17803.92:9#0;%&<=           >request           %%%%?72@9?/%?A7<#9B%C@...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%?-11:?%/%TE           %%?O3,...
2. searchrequest           !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99#           >%"#$$5"!!K)           %%?O3,2...
3. profitthat’s up to you
demo
distributed modelprovides:  performance  resiliency (high-availability)
shardsa portion of the document spaceeach one is a separate Lucene index  thus, many per-index settings are availabledocum...
zero-conf discoveryzen (multicast and unicast)cloud (EC2 via API)
auto-routingmaster node:  maintains cluster state  reassigns shards if nodes leave/join clusterany node can process the se...
replicaseach shard can have 1 or more replicas# of replicas can be updated dynamically afterindex creationreplicas can be ...
shard allocation               node 1       start with a single node
shard allocation                node 1                 person1                 person2      PUT /person {         “index”:...
shard allocation       node 1          node 2       person1         person1       person2         person2        start the...
shard allocationnode 1    node 2         node 3   node 4person1   person1person2   person2            start 2 more nodes
shard allocationnode 1    node 2         node 3    node 4person1                  person1          person2                ...
document shardingnode 1    node 2         node 3     node 4person1                   person1          person2             ...
document sharding     node 1         node 2         node 3     node 4     person1                        person1          ...
document shardingnode 1    node 2         node 3      node 4person1                   person1          person2            ...
document shardingnode 1    node 2         node 3     node 4person1                   person1          person2             ...
document shardingnode 1         node 2            node 3     node 4person1                           person1              ...
document shardingnode 1    node 2         node 3      node 4person1                   person1          person2            ...
scatter-gathernode 1          node 2        node 3          node 4person1                        person1                pe...
shard allocationnode 1          node 2        node 3          node 4person1                        person1                ...
shard allocationnode 1          node 2        node 3          node 4person1                        person1                ...
shard allocationnode 1          node 2        node 3          node 4person1                        person1                ...
demo
transactional modelper-document consistencyno need to commit/flushuses write-ahead transaction logwrite consistency (W) can...
(near) real-time search1 second refresh rate by default_refresh API also
index storagenode data considered transientcan be stored in local file system, JVM heap,native OS memory, or FS & memory co...
gatewayspersistent store for cluster state and indicesasynchronous, translog-based write strategyallows full recovery if a...
mappingdescribes document structure to the searchengineautomatically created with sensible defaultsexplicit mapping can be...
mappingimportant meta fields:  _source  _allthere are more
mapping typessimple:  string, integer/long, float/double, boolean, and  null)complex:  array, object
sample mappingdocument           >?"39#?/%%%%%%?<9#B!:?E           %?-B-$9?/%%%%%?W17X-%(27B!?E           %?-2H3?/%%%%%%G?...
analyzersbreak down (tokenize) and normalize fields duringindexing and query strings at search timeanalyzer = tokenizer + t...
analyzers                            analyzers, tokenizers, and filters can be                            customizedmapping...
API
API conventionsappend ?pretty=true to get readable JSONboolean values: false/0/off = false, rest is trueJSONP support via ...
API structurehttp://host:port/[index]/[type]/[_action/id] GET http://es:9200/_status GET http://es:9200/twitter/_status PO...
API structurehttp://host:port/[index]/[type]/[_action/id] GET http://es:9200/twitter/tweet/_search GET http://es:9200/twit...
API query example>%%%%?R"9#I?/%>%%%%%%%%?8B$-9#9<?/%>%%%%%%%%%%%%?R"9#I?/%>%%%%%%%%%%%%%%%%?R"9#IO3-#B7H?/%>%%%%%%%%%%%%%%...
API {core}index             searchbulk               querydelete             from/size pagingdelete by query    sortget   ...
API {indices}create           optimizedelete           snapshotopen/close       update settingsget/put/delete   analyzemap...
Query DSLterm / terms   query_stringrange            default_operatorprefix            analyzerbool             phrase_slop...
filtersshare some similar features with queries (term,range, etc)why use a filter?
filtersfaster than queriescached (depends on the filter)  the cache is used for different queries against  the same filterno ...
facetsprovide aggregated data based on the searchrequestterms, histogram, date histogram, range,statistical, and more
geo searchimplemented as filters (and a facet)  geo_distance  geo_bounding_box  geo_polygon
interfacesRESTJava /!GroovyLanguage clients (REST/Thrift):  pyes, PHP (standalone and symfony), Ruby, PerlFlume sink imple...
data importES is not the primary data store (usually)to import/synchronize data:  write an agent (Gearman, message queues,...
10 more featuresversioning          load balancing nodesindex aliases       pluginsparent/child docs   more_like_thisscrip...
Referenceshttp://github.com/elasticsearch/elasticsearchhttp://groups.google.com/a/elasticsearch.com/group/users/IRC: #elas...
Upcoming SlideShare
Loading in...5
×

99 problems but the search aint one, confoo 2011, andrei zmievski

1,004

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,004
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "99 problems but the search aint one, confoo 2011, andrei zmievski"

  1. 1. 99 Problems, ButThe Search Ain’t OneAndrei Zmievski • ConFoo •!Mar 9, 2011
  2. 2. who am i? curl http://localhost:9200/speaker/info/andrei{“name”: “Andrei Zmievski”, “works”: “Analog Co-op”, “projects”: [“PHP”, “PHP-GTK”, “Smarty”, “Unicode/i18n”], “likes”: [“coding”, “beer”, “brewing”, “photography”], “twitter”: “@a”, “email”: “andrei@zmievski.org”}
  3. 3. what is elasticsearch?a search engine for the NoSQL generation domain-driven distributed RESTful Hitchhiker’s Guide to the Galaxy (no, really)
  4. 4. document modeldocument-orientedJSON-basedschema-free
  5. 5. enginebased on Lucenemulti-tenancydistributed, out of the box
  6. 6. 3 easy steps
  7. 7. 1. index !"#$%&()*+%,--./00$1!2$,13-/45660!17803.92:9#0;%&<= >request %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7==-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N= >response %%%%?1:?/-#"9 %%%%?OB7<9P?/?!178? %%%%?O-I.9?/?3.92:9#? %%%%?OB<?/?;? N
  8. 8. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E %%%%%%?OB<?%/%?;?E %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  9. 9. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE total number of hits %%?,B-3?%/%> !!!!"#$#%&"!!()response %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E %%%%%%?OB<?%/%?;?E %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  10. 10. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;E the index of the docresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> !!!!!!"*+,-./"!!"0$,1") %%%%%%?O-I.9?%/%?3.92:9#?E %%%%%%?OB<?%/%?;?E %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  11. 11. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> the type of the doc %%%%%%?OB7<9P?%/%?!178?E !!!!!!"*#23."!!"43.%5.6") %%%%%%?OB<?%/%?;?E %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  12. 12. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E !!!!!!"*+-"!!"(") the id of the doc %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  13. 13. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E !!!!!!"*+-"!!"(") %%%%%%?O3!1#9?%/%6UV46LM64E the hit score %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  14. 14. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%?-11:?%/%TE %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E !!!!!!"*+-"!!"(") %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% the original doc contents 7 !!!!",%8."!"9,-6.+!:8+.;45+") !!!!"#%&5"!"<<!=6$>&.84)!>?#!#@.!A.%60@!9+,B#!C,.") !!!!"&+5.4"!D"0$-+,E")!">..6")!"3@$#$E6%3@2"F) !!!!"#G+##.6"!"%") !!!!"@.+E@#"!(HI J%N%J%N%N
  15. 15. 2. searchrequest !"#$%,--./00$1!2$,13-/45660!17803.92:9#0O392#!,QRSF99# >%"#$$5"!!K) %%?O3,2#<3?%/%> %%%%?-1-2$?%/%;E the execution time %%%%?3"!!9338"$?%/%;E %%%%?82B$9<?%/%6 %%NE %%?,B-3?%/%> %%%%?-1-2$?%/%;Eresponse %%%%?@2PO3!1#9?%/%6UV46LM64E %%%%?,B-3?%/%G%> %%%%%%?OB7<9P?%/%?!178?E %%%%%%?O-I.9?%/%?3.92:9#?E %%%%%%?OB<?%/%?;?E %%%%%%?O3!1#9?%/%6UV46LM64E %%%%%%?O31"#!9?%/% > %%%%?72@9?/%?A7<#9B%C@B9D3:B?E %%%%?-2$:?/%?44%(#1F$9@3E%F"-%-,9%*92#!,%AB7=-%)79?E %%%%?$B:93?/%G?!1<B7H?E%?F99#?E%?.,1-1H#2.,I?JE %%%%?-KB--9#?/%?2?E %%%%?,9BH,-?/%;LM N%N%J%N%N
  16. 16. 3. profitthat’s up to you
  17. 17. demo
  18. 18. distributed modelprovides: performance resiliency (high-availability)
  19. 19. shardsa portion of the document spaceeach one is a separate Lucene index thus, many per-index settings are availabledocument is sharded by its _id value but can be assigned (routed) to a shard deterministically
  20. 20. zero-conf discoveryzen (multicast and unicast)cloud (EC2 via API)
  21. 21. auto-routingmaster node: maintains cluster state reassigns shards if nodes leave/join clusterany node can process the search requestthe query is handled via scatter-gather mechanism
  22. 22. replicaseach shard can have 1 or more replicas# of replicas can be updated dynamically afterindex creationreplicas can be used for querying in parallel
  23. 23. shard allocation node 1 start with a single node
  24. 24. shard allocation node 1 person1 person2 PUT /person { “index”: { “number_of_shards”: 2, “number_of_replicas”: 1 }}
  25. 25. shard allocation node 1 node 2 person1 person1 person2 person2 start the second node
  26. 26. shard allocationnode 1 node 2 node 3 node 4person1 person1person2 person2 start 2 more nodes
  27. 27. shard allocationnode 1 node 2 node 3 node 4person1 person1 person2 person2 start 2 more nodes
  28. 28. document shardingnode 1 node 2 node 3 node 4person1 person1 person2 person2 PUT /person/info/1 {…}
  29. 29. document sharding node 1 node 2 node 3 node 4 person1 person1 person2 person2 PUT /person/info/1hashed to shard 1 {…}
  30. 30. document shardingnode 1 node 2 node 3 node 4person1 person1 person2 person2 replicated PUT /person/info/1 {…}
  31. 31. document shardingnode 1 node 2 node 3 node 4person1 person1 person2 person2 PUT /person/info/2 {…}
  32. 32. document shardingnode 1 node 2 node 3 node 4person1 person1 person2 person2hashed to shard 2 PUT /person/info/2 {…}
  33. 33. document shardingnode 1 node 2 node 3 node 4person1 person1 person2 person2 replicated PUT /person/info/2 {…}
  34. 34. scatter-gathernode 1 node 2 node 3 node 4person1 person1 person2 person2 GET /person/_search?q=name:thomas
  35. 35. shard allocationnode 1 node 2 node 3 node 4person1 person1 person2 person2 GET /person/_search?q=name:thomas
  36. 36. shard allocationnode 1 node 2 node 3 node 4person1 person1 person2 person2 GET /person/_search?q=name:thomas
  37. 37. shard allocationnode 1 node 2 node 3 node 4person1 person1 person2 person2 GET /person/_search?q=name:thomas
  38. 38. demo
  39. 39. transactional modelper-document consistencyno need to commit/flushuses write-ahead transaction logwrite consistency (W) can be controlled one, quorum, or all
  40. 40. (near) real-time search1 second refresh rate by default_refresh API also
  41. 41. index storagenode data considered transientcan be stored in local file system, JVM heap,native OS memory, or FS & memory combinationpersistent storage requires a gateway
  42. 42. gatewayspersistent store for cluster state and indicesasynchronous, translog-based write strategyallows full recovery if a cluster restart is neededsupported gateways: local shared FS Hadoop via HDFS S3
  43. 43. mappingdescribes document structure to the searchengineautomatically created with sensible defaultsexplicit mapping can be provided (generally, agood idea)can run into merge conflicts
  44. 44. mappingimportant meta fields: _source _allthere are more
  45. 45. mapping typessimple: string, integer/long, float/double, boolean, and null)complex: array, object
  46. 46. sample mappingdocument >?"39#?/%%%%%%?<9#B!:?E %?-B-$9?/%%%%%?W17X-%(27B!?E %?-2H3?/%%%%%%G?.#18B$B7H?E%?<9F"HHB7H?E%?.,.?JE %?.13-W2-9?/%%?56;6&;5&55+;M/;Y/;5?E %?.#B1#B-I?/%%5N >?.13-?/%> %%?.#1.9#-B93?%/%>mapping %%%%?"39#?/%%%%%%>?-I.9?/%?3-#B7H?E%?B7<9P?/%?71-O272$IZ9<?NE %%%%?@9332H9?/%%%>?-I.9?/%?3-#B7H?E%[F113-/%;UVNE %%%%?-2H3?/%%%%%%>?-I.9?/%?3-#B7H?E%?B7!$"<9OB7O2$$?/%?71?NE %%%%?.13-W2-9?%/%>?-I.9?%/%?<2-9?E%[3-1#9/%[71NE %%%%?.#B1#B-I?%/%>?-I.9?%/%?B7-9H9#?N NNN
  47. 47. analyzersbreak down (tokenize) and normalize fields duringindexing and query strings at search timeanalyzer = tokenizer + token filters (0 or more)*-27<2#<%A72$IZ9#%S%%%*-27<2#<%+1:97BZ9#%]%%%%%%%*-27<2#<%+1:97%^B$-9#%]%%%%%%%_1K9#!239%+1:97%^B$-9#%]%%%%%%%*-1.%+1:97%^B$-9#
  48. 48. analyzers analyzers, tokenizers, and filters can be customizedmapping elasticsearch.yml B7<9P/ %%272$I3B3/ %%%%272$IZ9#/ %%%%%%.?&%,E/ %%%%%%%%-I.9/%!"3-1@ %%%%%%%%-1:97BZ9#/%3-27<2#< %%%%%%%%8B$-9#/%G3-27<2#<E%$1K9#!239E%3-1.E %%%%%%%%%%%%%%%%%23!BB81$<B7HE%.1#-9#*-9@J ` ?-B-$9?/%>?-I.9?/%?3-#B7H?E%?272$IZ9#?/%?9"$27H?NE `
  49. 49. API
  50. 50. API conventionsappend ?pretty=true to get readable JSONboolean values: false/0/off = false, rest is trueJSONP support via callback parameter
  51. 51. API structurehttp://host:port/[index]/[type]/[_action/id] GET http://es:9200/_status GET http://es:9200/twitter/_status POST http://es:9200/twitter/tweet/1 GET http://es:9200/twitter/tweet/1
  52. 52. API structurehttp://host:port/[index]/[type]/[_action/id] GET http://es:9200/twitter/tweet/_search GET http://es:9200/twitter/user/_search GET http://es:9200/twitter/tweet,user/_search GET http://es:9200/twitter,facebook/_search GET http://es:9200/_search
  53. 53. API query example>%%%%?R"9#I?/%>%%%%%%%%?8B$-9#9<?/%>%%%%%%%%%%%%?R"9#I?/%>%%%%%%%%%%%%%%%%?R"9#IO3-#B7H?/%>%%%%%%%%%%%%%%%%%%%%?R"9#I?/%?811%F2#?E%%%%%%%%%%%%%%%%%%%%?<982"$-O1.9#2-1#?/%?AaW?E%%%%%%%%%%%%%%%%%%%%?8B9$<3?/%G?-B-$9?E%?<93!#B.-B17?JE%%%%%%%%%%%%%%%%%%%%?F113-?/%5U6%%%%%%%%%%%%%%%%N%%%%%%%%%%%%NE%%%%%%%%%%%%?8B$-9#?/%>%%%%%%%%%%%%%%%%?#27H9?/%>?<2-9?/%>?H-?/%?56;;&6T&64?NN%%%%%%%%%%%%N%%%%%%%%N%%%%NE%%%%?8#1@/%;6E%%%%?3BZ9?/%;6N
  54. 54. API {core}index searchbulk querydelete from/size pagingdelete by query sortget highlightingcount selective fields
  55. 55. API {indices}create optimizedelete snapshotopen/close update settingsget/put/delete analyzemapping statusrefresh flush
  56. 56. Query DSLterm / terms query_stringrange default_operatorprefix analyzerbool phrase_slopfuzzy etcwildcard
  57. 57. filtersshare some similar features with queries (term,range, etc)why use a filter?
  58. 58. filtersfaster than queriescached (depends on the filter) the cache is used for different queries against the same filterno scoringmore useful ones: term, terms, range, prefix, and,or, not, exists, missing, query
  59. 59. facetsprovide aggregated data based on the searchrequestterms, histogram, date histogram, range,statistical, and more
  60. 60. geo searchimplemented as filters (and a facet) geo_distance geo_bounding_box geo_polygon
  61. 61. interfacesRESTJava /!GroovyLanguage clients (REST/Thrift): pyes, PHP (standalone and symfony), Ruby, PerlFlume sink implementation
  62. 62. data importES is not the primary data store (usually)to import/synchronize data: write an agent (Gearman, message queues, etc) use rivers (CouchDB, RabbitMQ, Twitter)
  63. 63. 10 more featuresversioning load balancing nodesindex aliases pluginsparent/child docs more_like_thisscripting multi_field mappingdynamic mapping percolationtemplates
  64. 64. Referenceshttp://github.com/elasticsearch/elasticsearchhttp://groups.google.com/a/elasticsearch.com/group/users/IRC: #elasticsearch on irc.freenode.nettwitter: @elasticsearch
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×