Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ClassiでのElasticsearchの利用について

Nakamura shinichirou
February 20, 2019
630

 ClassiでのElasticsearchの利用について

教育プラットフォーム ClassiでどのようにElasticsearchを利用しているかの紹介です

Nakamura shinichirou

February 20, 2019
Tweet

Transcript

  1. Copyright © 2018 Classi Corp. All Rights Reserved.
    Classi
    Amazon Elasticsearch
    Service
    Copyright © 2018 Classi Corp. All Rights Reserved.


    View full-size slide

  2. Copyright © 2018 Classi Corp. All Rights Reserved.
    • ClassiElasticsearch

    • -(
    #!
    ".,.
    a. %*&+
    b. $

    1
    )'

    View full-size slide

  3. Copyright © 2018 Classi Corp. All Rights Reserved.
    • 8OY6b
    • twitter: s_nakamura, github: nakaearth
    • QI:Z)&-%Classi@B
    • ]U
    • sIer: 8H
    • BtoCBtoB 5*$
    :Z 10Ha
    • VD
    • ClassiRails4#'
    =

    • Classi
    • R[T^0+25$(ElasticsearchA)
    • WebtestrailsA
    • ,'5"/4T^(P>15+)MC
    • R[?WElasticsearch;
    )
    • `FT^XcSKEN(.5!*0B7) 5
    (<
    • Classi0+25$+3#& 5(LJ
    2
    _G\9

    View full-size slide

  4. Copyright © 2018 Classi Corp. All Rights Reserved.
    • Classi !
    • 4,40%1)%
    • &'4732*.)%
    • $--+#0/(ICT!
    3
    ClassiElasticsearch
    "

    View full-size slide

  5. Copyright © 2018 Classi Corp. All Rights Reserved.
    • ?8Amazon Elasticsearch Service2 1->C
    • $&7E+,&AC(+$+#("F
    • 3@/@9)" ,6 >C(;4*,')

    0=%,!• .:5/ D
    4
    ClassiElasticsearch2

    View full-size slide

  6. Copyright © 2018 Classi Corp. All Rights Reserved.
    5
    ClassiElasticsearch


    View full-size slide

  7. Copyright © 2018 Classi Corp. All Rights Reserved.
    #1)1(.'"%
    • Mysqlmroonga%+02$ 1$16
    5 ,-!2/1%D7 Elasticsearch:I

    F9P
    • 4G:I
    *2&KRmroonga
    S

    • U?KR*2&
    • *2&>C(NM VH@ )JO=Q1=
    N
    • ElasticsearchDocumentE8DBjsonBA*2&LT
    • jsonBA*2&JOU?KR
    ;3<
    • AWSAmazon Elasticsearch Service
    → Elasticsearch:I
    6
    ClassiElasticsearch6

    View full-size slide

  8. Copyright © 2018 Classi Corp. All Rights Reserved.
    (#("%!
    • -A F= )))
    • ' &( 10C+*7 1~2CBG
    ))
    • # $F>E K0
    • ,@:;24/L36 F
    =D58
    • ?H.1?I
    9 JN)))
    7
    ClassiElasticsearch.

    View full-size slide

  9. Copyright © 2018 Classi Corp. All Rights Reserved.
    (#("&!
    • >8
    4=A $*'(!%
    • 56:-Elasticsearch+,
    )))))
    @20)))(9;3.6<

    /
    ? B
    8
    >8
    7-1A=A

    View full-size slide

  10. Copyright © 2018 Classi Corp. All Rights Reserved.
    +&+%)$"
    • Elasticsearch(,!*+- BOindex2A

    ?E;',#import
    • ',#import/.NBO',#4
    • 6JM
    C@KS
    • >DFH6G1R0=3~5G:FH
    9
    QLF59TPT
    7(,!*+
    E;index
    ver5index2A
    APP

    View full-size slide

  11. Copyright © 2018 Classi Corp. All Rights Reserved.

    10
    ClassiElasticsearch

    View full-size slide

  12. Copyright © 2018 Classi Corp. All Rights Reserved.
    .$
    • 53
    • *%(.1index"+
    • (.1 &
    • message comment1)'07!
    JSON6
    28(nested object9
    • -,) /45
    11
    ClassiElasticsearch#

    View full-size slide

  13. Copyright © 2018 Classi Corp. All Rights Reserved.
    8*"$
    • .85-
    index5,&%
    • index'3 :2####
    • master node>index'3index769<)
    1@
    • =/master node?+index540';!
    !$
    12
    ClassiElasticsearch(

    View full-size slide

  14. Copyright © 2018 Classi Corp. All Rights Reserved.
    $
    • index# $Index%!"
    • master node3node2
    13
    Classi Elasticsearch

    View full-size slide

  15. Copyright © 2018 Classi Corp. All Rights Reserved.
    #Index "#ID&%
    ' 60index $ !
    14
    Classi
    Elasticsearch
    index1 index2 index3
    2 3 1
    7 6 5

    View full-size slide

  16. Copyright © 2018 Classi Corp. All Rights Reserved.
    • 1node?325%($", Elasticsearch
    6;_id+messageid@(B?


    )
    • _id25IDmessageid"=0!

    • >4Elasticsearch-modelgem7</
    • 5-#'(&.9A:*8
    15
    ClassiElasticsearch")

    View full-size slide

  17. Copyright © 2018 Classi Corp. All Rights Reserved.
    (% "
    • #6*&→"! !!
    • ',AWSAmazon Elasticsearch Serviceupdate-$
    )+"..
    16
    ClassiElasticsearch$

    View full-size slide

  18. Copyright © 2018 Classi Corp. All Rights Reserved.
    '& #
    • 5*%(+
    • "!#$#")#
    "!# ,#")
    17
    ClassiElasticsearch%

    View full-size slide

  19. Copyright © 2018 Classi Corp. All Rights Reserved.
    $
    • +%"'* )

    '*
    • (#!&'*
    18
    Classi Elasticsearch

    View full-size slide

  20. Copyright © 2018 Classi Corp. All Rights Reserved.
    8*#%!
    • 5=(9?2=5='@
    <)20 35=( (

    • 1B16 " $&7575+;
    A:/C-
    • 4.,75>

    19
    ClassiElasticsearch(

    View full-size slide

  21. Copyright © 2018 Classi Corp. All Rights Reserved.

    1
    • Elasticsearch0DAkibana2
    → ),"B;A43G>9&
    -+(5@ =C
    • %/*.!&E68
    → 2:?G
    x-pack2→'.+/$.sql
    →F<#7
    20
    ClassiElasticsearch2

    View full-size slide

  22. Copyright © 2018 Classi Corp. All Rights Reserved.
    • -$ Elasticsearch#&

    • "!
    • Elasticsearch%,.-$* 0+
    /
    '
    21
    )(

    View full-size slide

  23. Copyright © 2018 Classi Corp. All Rights Reserved.


    22

    View full-size slide