标准的restful接口

查看所有index, 等价于show tables;

GET _cat/indices

GET test_index

GET kibana_sample_data_logs?include_type_name=true&include_defaults=true

  • aliases
  • mappings
  • settings

DELETE test_index

DELETE test_index?ignore_unavailable=true ==> drop table xx if exists

P{"}UmTapkp}"}ii,sbn"}e"}ag_tinsd"}tn"""a"opidnan_cr"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}"}neuuus:"o@,a,b,c,e,e,g,h,i,i,m,m,m,p,r,r,r,t,t,u,ugxmtmapt""g""}y"l"v"}x""}e"}o""}n""}p"a"}e"e""}h"e"e""}e""}a""}i"r""}t"s"bobm{:eitpetfttitepttfopstfdtf"tcpmtstfptftqtfstfgtfmtltfct"e_eprmyanyi"}eyeynr"}eyi"}"r"}"}"}"}tyi"}eyi"}yhr"}"}oysyi"}myeyuyi"}pyi"}syi"}ey"yi"}_y:rerl{tepttpekspnptodnpekoc,d,s,s"pekxpek:pioo,rrpapekeprpepekopek"peksppektp:_x_eiseh"ele"""ete"pa"sele"":po"e"r"r"ele"""ele""enps""}a"yegele""meeesele""nele""ele""te:ele""ie{opo_et"""dyti"i"etti"dytieotstctct:"dyti"dyti{"ee"tfmt""e"dytio"r"t"dytis"dyti:"dytia""dytim"{fafdsa:swyg:p:rayoswyg{rryty"ydyswyg:swyg"ryi"}"y"swygr""swygeswygswygm{swyge_n_a"m:::"opn:":tspn:"opntdp"ppep{:"opn:"opn:t:pekp:::"opny:::"opn":"opn{:"opnp::"opn":sdrtp{reo{{iee"reoiiee:esereo{reo:iele"":e:reo"::reoreoreo"reoh_ea:"""":d"r":"et"":d"ren":""t"":d"r":d"r"e{"dyti"{"":d"r""":d"r:":d"r":d"r"":d"r:"arp_att"elis":t"esa{"t"et"ei{sswyg{d{t"e:l{k{t"et"et"e:dt"edrele{:lie{:_o{p":e{:_"t:{:::e{:_e{:_p":"opn:oe{:_oee{:_{e{:_e{:_ae{:_{adpicimx:an":{x:ae:x:ax:a"reoux:a{nyx:ax:ax:a{tx:atslco{aet"bg:"t"b:s""""t"bt"b:":d"r"bt"bgwt"bt"bt"bet"be"iamss"{ko"{k"{ko"gkk{k"{ko"{kot"ell"{ko"o"{ko"{ko"{ko""{ko"csm"t,ev{e,ev{eeee,ev,ev{e{:_oe,evr,ev,ev,ev,ev:a"e,ayeyye:oyyyyeyex:an"yedyeyeyeyesrmw"ww"_wwww"w"t"bgw""w"w"w"w""":cpooo{pooooo"{ko"ooooo1e"r:rr:orrrr:r:,evr:r:r:r:r:":"2dddidddddyeddddd,1?"2""2n""""2"2w""2"2"2"2"2""i,5,5t,5,5o,5,5,5,5,50n66"66r:66666-cd1l"2"u,5,d6e_type_name=true

改 reindex

P{}OS"}"}Td,se"o"_siuirtnrne"dcdi:eeenx"xd{":"e::x{?""wkkaiiibbtaa_nnfaao__rss_aacmmoppmllpeel__eddtaaittoaan__=eetccrooummemmeerrccee2""
P{}OS"]Tac{}{}_t,ai"}"}loarind""e""asdiamias""nlonle::divdiseaeea[{xs"xs"":""::::{""""kekeicicboboamamnmnmaeae_r_rscscaeaem"m"ppllee__ddaattaa__eeccoommmmeerrccee2"",,

mapping

POST kibana_sample_data_ecommerce2/_mapping {

"}pr"}oapg""}eetfrnyi"}"}ttpek,hi"ele""e""e:"dytiltis:swyglyg"{"opnopn:":reo"eotd"r:"r{e{":e{:ex:_"_t"aka"{kbeb,eoyoyvwvweoeo"r"r:d:d""2,1,56

}

settings

PUT kibana_sample_data_ecommerce2/_settings {

"}in""daneuuxtm"ob:_eer{x_poafn_dr_erpelpilciacsa"s:":"2""0-1",

}

直接 ==> 插入数据,

让他动态索引(dynamic mapping)得到mapping,在此基础上更改。

字段类型

Field data types

Elasticsearch supports a number of different data types for the fields in a document:

Core data types

Complex data types

  • Object

    object for single JSON objects

  • Nested

    nested for arrays of JSON objects

Spatial data types

  • Geo-point

    geo_point for lat/lon points

  • Geo-shape

    geo_shape for complex shapes like polygons

  • Point

    point for arbitrary cartesian points.

  • Shape

    shape for arbitrary cartesian geometries.

Specialised data types

  • IP

    ip for IPv4 and IPv6 addresses

  • Completion data type

    completion to provide auto-complete suggestions

  • Token count

    token_count to count the number of tokens in a string

  • mapper-murmur3

    murmur3 to compute hashes of values at index-time and store them in the index

  • mapper-annotated-text

    annotated-text to index text containing special markup (typically used for identifying named entities)

  • Percolator

    Accepts queries from the query-dsl

  • Join

    Defines parent/child relation for documents within the same index

  • Rank feature

    Record numeric feature to boost hits at query time.

  • Rank features

    Record numeric features to boost hits at query time.

  • Dense vector

    Record dense vectors of float values.

  • Sparse vector

    Record sparse vectors of float values.

  • Search-as-you-type

    A text-like field optimized for queries to implement as-you-type completion

  • Alias

    Defines an alias to an existing field.

  • Flattened

    Allows an entire JSON object to be indexed as a single field.

  • Histogram

    histogram for pre-aggregated numerical values for percentiles aggregations.

  • Constant keyword

    Specialization of keyword for the case when all documents have the same value.

Arrays

In Elasticsearch, arrays do not require a dedicated field data type. Any field can contain zero or more values by default, however, all values in the array must be of the same data type. See Arrays.

Multi-fields

It is often useful to index the same field in different ways for different purposes. For instance, a string field could be mapped as a text field for full-text search, and as a keyword field for sorting or aggregations. Alternatively, you could index a text field with the standard analyzer, the english analyzer, and the french analyzer.

This is the purpose of multi-fields. Most data types support multi-fields via the fieldsparameter.

“dynamic” : “true” | “false” | “strict”

“copy_to”

数组

多字段特性

简单提下, 下下次专门讲这块

Analysis | Built-in analyzer

char filter

Tokenizer [必须有一个]

token filter

hmptaamptlpt_iesnrtgnr_irpeplace
P{}UT"}sme"}yta-tn"}iiaannln"}dgyamessly"""]"]x"iy_ttc,f-:szcyoh"i""0"eupkahlla0{:rseerttos0"t"n_mewc0{:o:iflrei0mzi_"ri1{_"els:cfacrttaonu"er[slas:riedlt"p"iyo":",nzmsge"t["r,a"n:da{rd",

下一篇

### Python资源大全