Book Image

ElasticSearch Cookbook

By : Alberto Paro
Book Image

ElasticSearch Cookbook

By: Alberto Paro

Overview of this book

ElasticSearch is one of the most promising NoSQL technologies available and is built to provide a scalable search solution with built-in support for near real-time search and multi-tenancy. This practical guide is a complete reference for using ElasticSearch and covers 360 degrees of the ElasticSearch ecosystem. We will get started by showing you how to choose the correct transport layer, communicate with the server, and create custom internal actions for boosting tailored needs. Starting with the basics of the ElasticSearch architecture and how to efficiently index, search, and execute analytics on it, you will learn how to extend ElasticSearch by scripting and monitoring its behaviour. Step-by-step, this book will help you to improve your ability to manage data in indexing with more tailored mappings, along with searching and executing analytics with facets. The topics explored in the book also cover how to integrate ElasticSearch with Python and Java applications. This comprehensive guide will allow you to master storing, searching, and analyzing data with ElasticSearch.
Table of Contents (19 chapters)
ElasticSearch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index

A

  • abs(a) function /
  • acknowledge
    • about /
  • acksql
    • about /
  • acksqlparams
    • about /
  • acos(a) function /
  • actionGet method /
  • Actions button /
  • active_primary_shards /
  • active_shards /
  • add /
  • addFacet /
  • addField(s) /
  • addHighlighting /
  • additional script plugins
    • installing /
  • addProcessor method /
  • addScriptField /
  • addTransportAddress method /
  • add_date_facet /
  • add_geo_facet /
  • add_term_facet /
  • admin.indices object /
  • alias /
  • all_terms parameter /
  • analyzer parameter /
  • analyzer plugin
    • creating /
  • analyzers
    • mapping /
  • and filter
    • executing /
  • andFilter /
  • and parameter /
  • Apache HttpComponents
    • URL /
  • Apache HTTPComponents Client
    • URL /
  • API
    • cluster health, controlling via /
    • cluster state, controlling via /
    • nodes information, obtaining via /
    • node statistic, obtaining via /
  • arrays
    • mapping /
  • asin(a) function /
  • atan(a) function /
  • atan2(y, x) function /
  • atomic operations
    • speeding up /
  • attachment field
    • mapping /
  • AttachmentField /
  • autocommit
    • about /

B

  • base types
    • mapping /
  • BigDesk
    • installing /
    • using /
  • blocks /
  • Boolean filter
    • using /
  • Boolean query
    • using /
  • boolFilter /
  • bool parameter /
  • boolQuery /
  • boost option /
  • boost parameter /
  • Boost parameter /
  • BroadcastOperationRequest/Response /
  • bulk action
    • managing /
  • bulkBuilder method /
  • bulk_size
    • about /
  • bulk_size parameter /
  • bulk_timeout parameter /

C

  • <client>.force_bulk method /
  • cbrt(a) function /
  • ceil(a) function /
  • child document
    • managing /
  • client
    • creating /
  • client.admin().indices() /
  • client.execute method /
  • client.transport.ignore_cluster_name /
  • client.transport.nodes_sampler_interval /
  • client.transport.ping_timeout /
  • client.transport.sniff /
  • Client parameter /
  • close() method /
  • close function /
  • close method /
  • cluster
    • about /
  • cluster.name /
  • cluster action
    • creating /
  • cluster health
    • controlling, via API /
  • cluster state
    • controlling, via API /
  • config directory /
  • connection_class parameter /
  • consistency parameter /
  • consistency value /
  • constantScoreQuery /
  • consumer thread /
  • correct query
    • suggesting /
  • cos(a) function /
  • cosh(x) function /
  • CouchDB river
    • using /
    • URL /
  • count field /
  • counting query
    • executing /
  • CRUD (Create-Read-Update-Delete) /
  • ctx.op /
  • ctx._source /
  • ctx._timestamp /
  • custom parameter /
  • cutoff_frequency parameter /
  • cyclic
    • using /

D

  • data
    • managing /
  • date histogram facets
    • executing /
  • date_detection option /
  • db parameter /
  • delay method /
  • delete
    • about /
  • delete by query
    • executing /
  • description method /
  • digesting
    • about /
  • disable_coord parameter /
  • Distance parameter /
  • distance_type (plane/arc/factor) parameter /
  • distance_type parameter /
  • document
    • mapping /
    • indexing /
    • obtaining /
    • deleting /
    • updating /
    • matching /
  • document mapping
    • dynamic templates, using /
  • DocumentObjectField /
  • documents
    • managing /
  • driver
    • about /
  • dynamic templates
    • using, in document mapping /
  • dynamic_date_formats option /
  • dynamic_templates option /
  • {dynamic_type} /

E

  • ElasticSearch
    • operations /
    • communicating with /
    • downloading /
    • installing /
    • URL /
    • directories /
    • setting up, for Linux systems /
  • ElasticSearch blog
    • URL /
  • ElasticSearch documentation
    • URL /
  • ElasticSearch Head
    • using /
    • installing /
  • ElasticSearch logging system
    • URL /
  • ElasticSearch plugin
    • URL /
  • ElasticSearch thrift plugin
    • URL /
  • ElasticSearch transport memcached
    • URL /
  • entries field /
  • epoch value
    • URL /
  • exchange parameter /
  • exchange_declare parameter /
  • exchange_durable parameter /
  • exchange_type parameter /
  • existing filter
    • executing /
  • exp(a) function /
  • explain parameter /
  • explanation() /
  • explicit mapping creation
    • using /

F

  • FacetFactory helper /
  • facets
    • executing /
  • facet search
    • executing /
  • facets parameter /
  • factor parameter /
  • fetchsize
    • about /
  • field(String name) /
  • field parameter /
  • fieldQuery /
  • fields /
  • fields option /
  • fields parameter /
  • files system data /
  • filteredQuery /
  • filtered query /
  • filter facets
    • executing /
  • filter parameter /
  • filter_parameters parameter /
  • flags parameter /
  • floor(a) function /
  • flush /
  • fragment_size parameter /
  • from parameter /
  • fuzziness parameter /
  • fuzzyLikeThisQuery /

G

  • generic data
    • adding, to mapping /
  • geo distance facets
    • executing /
  • geohash parameter /
  • geohash value
    • URL /
  • geohash_precision parameter /
  • GeoPoint field
    • mapping /
  • GeoShape
    • URL /
  • GeoShape field
    • mapping /
  • geo_bounding_box filter
    • using /
  • geo_distance filter
    • using /
  • geo_point field /
  • geo_polygon filter
    • using /
  • GET
    • speeding up /
  • GitHub repository
    • URL /
  • Glob pattern
    • URL /
  • Google Guice
    • URL /
  • Groovy
    • about /
    • URL /
  • gte parameter /
  • gt parameter /

H

  • hamcrest
    • URL /
  • handleRequest method /
  • has_child filter
    • using /
  • has_child query
    • using /
  • has_parent filter
    • using /
  • has_parent query
    • using /
  • heartbeat parameter /
  • Highlighter helper /
  • highlighting parameter /
  • highlight option /
  • histogram facets
    • executing /
  • hits /
  • hits option /
  • hostname /
  • host parameter /
  • http /
  • HTTP client
    • creating /
  • HTTP protocol
    • advantages /
    • disadvantages /
    • using /
    • about /
  • HttpRequestRetryHandler method /
  • http_address /
  • hypot(x,y) function /

I

  • ICU Analysis Plugin
    • URL /
  • id() /
  • idsFilter /
  • IDS filter
    • using /
  • ids parameter /
  • IDS query
    • using /
  • idsQuery /
  • IEEEremainder(f1, f2) function /
  • ignore_attachments parameter /
  • ignore_conflicts parameter /
  • ignore_retweet parameter /
  • ignore_unmapped (true/false) parameter /
  • include_in_all option /
  • include_in_lower parameter /
  • include_in_parent /
  • include_in_root /
  • include_in_upper parameter /
  • incremental_factor parameter /
  • index
    • creating /
    • deleting /
    • opening /
    • closing /
    • mapping, putting /
    • refreshing /
    • flushing /
    • optimizing /
    • existance, checking /
    • about /
  • index() /
  • index aliases
    • using /
  • IndexBuilder method /
  • index option /
  • index parameter /
  • index property /
  • IndexReplicationOperationRequest /
  • index settings
    • managing /
    /
  • index value /
  • index_analyzer option /
  • index_boost parameter /
  • index_name field /
  • index_name parameter /
  • index_settings
    • about /
  • indices /
    • managing, with native client /
    • managing /
  • IndicesExistsResponse object /
  • initializing_shards /
  • InstanceShardOperationRequest /
  • InternalIndexShard object /
  • interval parameter /
  • in_order parameter /
  • IPField /
  • IP field
    • mapping /

J

  • Japanese (kuromoji) Analysis Plugin
    • URL /
  • Java API
    • URL /
  • JavaScript
    • about /
    • URL /
  • JDBC river
    • using /
  • JDBC river plugin
    • URL /
  • Jest
    • URL /
  • Jetty plugin
    • URL /
  • Jetty Plugin
    • URL /
  • jsonBuilder method /
  • jvm /

K

  • key_field field /
  • key_field parameter /
  • Kibana
    • URL /

L

  • lat_lon parameter /
  • lib directory /
  • Linux systems
    • ElasticSearch, setting up for /
  • ListBulker object /
  • locale
    • about /
  • log(a) function /
  • log10(a) function /
  • logging settings
    • changing /
  • lte parameter /
  • lt parameter /
  • Lucene documentation
    • URL /

M

  • mapping
    • putting, in index /
    • obtaining /
    • deleting /
  • mappings /
    • managing /
  • MasterNodeOperationRequest /
  • master_node /
  • match /
  • matchAllFilter /
  • matchAllQuery /
  • matchPhraseQuery /
  • matchQuery /
  • match query
    • using /
  • match_all query /
  • match_mapping_type /
  • match_pattern /
  • maven package command /
  • Maven repository
    • URL /
  • max(a, b) function /
  • max field /
  • maxScore /
  • max_bulk_requests
    • about /
  • max_num_segments /
  • max_retries
    • about /
  • max_retries_wait
    • about /
  • max_rows
    • about /
  • mean field /
  • MemcachedConnection /
  • Memcached protocol
    • about /
  • metadata /
  • min(a, b) function /
  • min field /
  • minimum_match/minimum_should_match parameter /
  • missing (_last/_first) parameter /
  • missing field /
  • missing filter
    • executing /
  • mode parameter /
  • MongoDB river
    • using /
  • MongoDB river plugin
    • installing, URL /
    • URL /
  • moreLikeThisQuery /
  • Morphological Analysis Plugin
    • URL /
  • MultiField
    • mapping /
  • MVEL
    • URL /
    • about /
  • MySql driver
    • URL /

N

  • Nagios plugin
    • for Elasticsearch, URL /
  • Nagios server
    • URL /
  • name method /
  • native client
    • creating /
    • indices, managing with /
  • native protocol
    • advantages /
    • disadvantages /
    • using /
  • NestedObject /
  • nested objects
    • managing /
  • nested_filter parameter /
  • nested_path parameter /
  • network /
  • networking
    • setting up /
  • newRequestBuilder method /
  • newResponse method /
  • node
    • about /
    • setting up /
  • NodeOperationRequest /
  • nodes /
  • Node Services
    • about /
  • nodes information
    • obtaining, via API /
  • node statistic
    • obtaining, via API /
  • node types
    • setting up /
  • notFilter /
  • not filter
    • executing /
  • no_verify parameter /
  • null_value option /
  • number_of_data_nodes /
  • number_of_fragments parameter /
  • number_of_nodes /
  • number_of_replicas parameter /
  • number_of_shards parameter /
  • numeric_detection option /
  • {name} /

O

  • oauth parameter /
  • object
    • mapping /
    • properties /
  • ObjectField /
  • Object Relational Mapping (ORM) /
  • one shot
    • using /
  • onFailure method /
  • only_expunge_deletes /
  • operator parameter /
  • oplog (Operation log) /
  • optimistic concurrency control
    • URL /
  • optimize_bbox parameter /
  • op_type /
  • order (acs/desc) parameter /
  • order parameter /
  • or filter
    • executing /
  • orFilter /
  • or parameter /
  • os /
  • other field /

P

  • params field /
  • params parameter /
  • parent /
  • parent parameter /
  • pass parameter /
  • password
    • about /
  • password parameter /
  • path_match /
  • path_unmatch /
  • Phonetic Analysis Plugin
    • URL /
  • plain parameter /
  • plugin
    • installing /
    • installing manually /
    • removing /
  • plugins /
  • poll
    • about /
  • port parameter /
  • PostgreSQL driver
    • URL /
  • pow(a, b) function /
  • precision_step property /
  • preference parameter /
  • prefix query/filter
    • using /
  • pre_tags/post_tags parameter /
  • process /
  • processAnalyzers method /
  • processBulkIfNeeded method /
  • producer thread /
  • protocol parameter /
  • PyES
    • on GitHub, URL /
  • PyES online documentation
    • URL /
  • Python
    • URL /
    • about /
  • Python language plugin
    • URL /
  • Python memcached library
    • URL /
  • Python thrift library
    • URL /

Q

  • query
    • creating /
  • query facets
    • executing /
  • query parameter /
  • query_weight parameter /
  • queue parameter /
  • queue_auto_delete parameter /
  • queue_declare parameter /
  • queue_durable parameter /

R

  • RabbitMQ river
    • using /
  • RabbitMQ river documentation
    • URL /
  • RabbitMQ river plugin
    • installing, URL /
  • random() function /
  • range facets
    • executing /
  • range filter
    • using /
  • rangeFilter /
  • range query
    • using /
  • raw parameter /
  • readFrom method /
  • red status
    • solving /
  • refresh /
  • refresh parameter /
  • regex parameter /
  • regexp filter
    • using /
  • regexpFilter /
  • regexp query
    • using /
  • regexpQuery /
  • regex_flags parameter /
  • relocating_shards /
  • replication
    • about /
    /
  • Request button /
  • RequestsHttpConnection /
  • rescore parameter /
  • Response object /
  • RestController parameter /
  • REST plugin
    • creating /
  • results
    • highlighting /
  • ResultSet object /
  • return fields
    • computing, with scripting /
  • rint(a) function /
  • river
    • managing /
  • river plugin
    • creating /
  • round(a) function /
  • rounding
    • about /
  • routing /
  • routing parameter /
  • routing_nodes /
  • routing_table /
  • run function /
  • run method /

S

  • .search() method /
  • scale
    • about /
  • scan query
    • executing /
  • scan search
    • executing /
  • score() /
  • score parameter /
  • score_type parameter /
  • script
    • used, for sorting /
  • ScriptFields helper /
  • scriptFilter /
  • scripting
    • return fields, computing with /
    • search, filtering via /
    • used, for updating /
  • script parameter /
  • scriptType parameter /
  • script_field parameter /
  • script_fields parameter /
  • scroll=(your timeout) parameter /
  • scroll parameter /
  • scroll search
    • executing /
  • ScrutMyDocs
    • URL /
  • search
    • executing /
    • sorting /
    • filtering, via scripting /
  • SearchHit object /
  • Search object /
  • search_analyzer option /
  • search_type=scan parameter /
  • search_type parameter /
  • SemaText
    • URL /
  • SemaText SPM
    • installing /
    • using /
  • Sense
    • URL /
  • setIndices /
  • setQuery /
  • setScroll method /
  • settings /
  • Settings parameter /
  • setTypes /
  • Shard
    • URL /
  • shard() /
  • sharding
    • about /
  • shardOperation method /
  • shard_size parameter /
  • signum(d) function /
  • simple plugin
    • creating /
  • sin(a) function /
  • SingleCustomOperationRequest /
  • SingleShardOperationRequest /
  • sinh(x) function /
  • site plugin
    • creating /
  • size parameter /
  • slop parameter /
  • Smart Chinese Analysis Plugin
    • URL /
  • sniffer_timeout /
  • sniff_on_connection_fail /
  • sniff_on_start /
  • Sorted helper /
  • sorting
    • script, using /
  • sort option /
  • sort parameter /
  • sortValues() /
  • span queries
    • using /
  • sql
    • about /
  • sqlparams
    • about /
  • sqrt(a) function /
  • standard search
    • executing /
  • start function /
  • start method /
  • State /
  • statistical facets
    • executing /
  • std_deviation field /
  • strategy
    • about /
  • suggest parameter /
  • sum_of_squares field /

T

  • tags_schema=*styled* parameter /
  • tan(a) function /
  • tanh(x) function /
  • templates /
  • termFilter /
  • term filter
    • executing /
  • termQuery /
  • term query
    • executing /
    /
  • terms facets
    • executing /
  • terms field /
  • terms filter
    • executing /
  • termsFilter /
  • termsQuery /
  • terms query
    • executing /
  • term statistical facets
    • executing /
  • testNG
    • URL /
  • the JDBC plugin river
    • URL /
  • thread_pool /
  • ThriftConnection /
  • Thrift ElasticSearch plugin
    • URL /
  • Thrift protocol
    • advantages /
    • disadvantages /
    • using /
    • URL /
    • about /
  • thrift support
    • for Python, URL /
  • thrift_address /
  • Tika library page
    • URL /
  • time() function /
  • timeout /
  • timestamp /
  • timestamp parameter /
  • time_interval parameter /
  • time_out option /
  • toDegrees(angrad) function /
  • took option /
  • to parameter /
  • top_children query
    • using /
  • toRadians(angdeg) function /
  • total field /
  • totalHits /
  • transport /
  • transport_address /
  • transport_class variable /
  • ttl /
  • ttl parameter /
  • Twitter
    • URL /
  • Twitter river
    • using /
  • Twitter river plugin
    • URL /
  • type
    • existance, checking /
    • about /
  • type() /
  • type field /
  • typeFilter /
  • type parameter /
  • type property /
  • type value /
  • type_mapping
    • about /

U

  • ulp(d) function /
  • unassigned_shards /
  • unit parameter /
  • unmatch /
  • update
    • about /
  • updating
    • scripting, using /
  • url
    • about /
  • Urllib3HttpConnection /
  • user
    • about /
  • user parameter /

V

  • Validate button /
  • value_script parameter /
  • variance field /
  • version /
  • version() /
  • versioning
    • about /
  • version parameter /
  • version value /
  • vhost parameter /

W

  • wait_for_merge /
  • wildcardFilter /
  • wildcardQuery /
  • window_size parameter /
  • writeTo method /

Y

  • yellow status
    • solving /

Z

  • zero_term_query parameter /