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

トルテが実践したマッチしたユーザーを除く3つの方法/torte-es

Take
September 11, 2017

 トルテが実践したマッチしたユーザーを除く3つの方法/torte-es

Take

September 11, 2017
Tweet

More Decks by Take

Other Decks in Technology

Transcript

  1. w ύλʔϯ" w EPDVNFOUʹ࣋ͨͤΔ w ύλʔϯ# w RVFSZʹ࣋ͨͤΔ w ύλʔϯ$

    w 1BSFOUDIJMEΛ࢖͏ Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  2. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  FYDMVEF@VTFST   ʜ 6TFS*% dύλʔϯ"d FYDMVEFVTFSTʹࣗ෼ؚ͕·Ε ͍ͯͳ͍EPDVNFOUΛݕࡧ Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  3. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  FYDMVEF@VTFST   ʜ ϝϦοτ w γϯϓϧ w ݕࡧ͕଎͍ σϝϦοτ w FYDMVEF@VTFSTͷංେԽ w ߋ৽͕஗͘ͳΔ dύλʔϯ"d Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  4. Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ "mappings" : { "user": { "properties": { "id": {

    "type": "keyword" }, "name": { "type": "keyword", "index": false }, /* தུ */ "exclude_users": { "type": "keyword" } } } }
  5. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  ݕࡧΫΤϦͰ
 FYDMVEFVTFSTΛࢦఆ dύλʔϯ#d Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  6. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  ϝϦοτ w γϯϓϧ w ߋ৽ॲཧ͕଎͍ σϝϦοτ w ݕࡧΫΤϦͷංେԽ w ݕࡧ͕஗͘ͳΔ dύλʔϯ#d Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  7. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  dύλʔϯ$d FYDMVEFVTFS EPDVNFOU JE  SFBTPO ϚονࡁΈ ݕࡧΫΤϦͰFYDMVEFVTFS
 ࣗ෼ Λࢠʹ࣋ͨͳ͍
 EPDVNFOUΛݕࡧ 6TFS*% Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏
  8. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  FYDMVEFVTFS EPDVNFOU JE  SFBTPO ϚονࡁΈ ϝϦοτ w ൺֱతݕࡧ΋ߋ৽΋଎͍ σϝϦοτ w ෳࡶ w FYDMVEFVTFSͷ෼
 EPDVNFOU਺͕૿Ճ w 1BSFOUDIJME͸&4ܥͰ
 ࢓༷มߋ͕༧ఆ͞Ε͍ͯΔ Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ dύλʔϯ$d
  9. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  FYDMVEFVTFS EPDVNFOU JE  SFBTPO ϚονࡁΈ ϝϦοτ w ൺֱతݕࡧ΋ߋ৽΋଎͍ σϝϦοτ w ෳࡶ w FYDMVEFVTFSͷ෼
 EPDVNFOU਺͕૿Ճ w 1BSFOUDIJME͸&4ܥͰ
 ࢓༷มߋ͕༧ఆ͞Ε͍ͯΔ Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ dύλʔϯ$d 5PSUFͰ࠾༻
  10. Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ "mappings" : { "user": { "properties": { "id": {

    "type": "keyword" }, /* தུ */ } }, "exclude_user": { "_parent": { "type": "user" }, "properties": { "id": { "type": "keyword" }, "reason": { "type": "short" } } } }
  11. Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ { "query": { "bool": { "must_not": { "has_child": {

    "type": "exclude_user", "query": { "term": { "id": "16" } } } } } } }
  12. 6TFSEPDVNFOU JE  OBNF ͋΍Ͷ HFOEFS GFNBMF CJSUIEBZ  CJSUI@BSFB

    ౦ژ౎ CMPPE@UZQF # IFJHIU  FYDMVEFVTFS EPDVNFOU JE  SFBTPO ϚονࡁΈ ϝϦοτ w ൺֱతݕࡧ΋ߋ৽΋଎͍ σϝϦοτ w ෳࡶ w FYDMVEFVTFSͷ෼
 EPDVNFOU਺͕૿Ճ w 1BSFOUDIJME͸&4ܥͰ
 ࢓༷มߋ͕༧ఆ͞Ε͍ͯΔ Ϛονͨ͠ϢʔβʔΛআͭ͘ͷํ๏ dύλʔϯ$d 5PSUFͰ࠾༻ %&13&$"5&%
  13. &MBTUJD$MPVE w &MBTUJDࣾެࣜͷϑϧϚωʔδυαʔϏε w ೝূ w )5514઀ଓͷ#BTJDೝূͰ࣮૷͕؆୯ w ,JCBOBͷ6*͔ΒϢʔβʔ௥Ճ w

    ࡉ͔͍3PMFͷ؅ཧ͕Մೳ w ࠷৽ͷ&MBTUJDTFBSDI͕ར༻Մೳ &MBTUJDTFBSDIPO&$&MBTUJD$MPVE
  14. "NB[PO&MBTUJDTFBSDI4FSWJDF w ࣗಈTOBQTIPU͕ར༻Մೳ 4  w ΠϯελϯεͷλΠϓ΍Ϋϥελͷߏ੒Λ ࡉ͔͘ઃఆՄೳ w ,JOFTJT'JSFIPTF

    
 -BNCEB 
 $MPVE8BUDIͱͷ਌࿨ੑͷߴ͞ &MBTUJDTFBSDIPO&$"NB[PO&MBTUJDTFBSDI4FSWJDF
  15. w &MBTUJD$MPVE w 91BDL΋࢖͑ͯશ෦ೖΓ w ࠷৽ͷ&MBTUJDTFBSDI͕࢖͑Δ w ($1΋બ΂Δ w "NB[PO&MBTUJDTFBSDI4FSWJDF

    w ϩάूܭͱՄࢹԽ͕໨తͷ৭͕ڧ͍ w طଘͷϚωδϝϯταʔϏεͱͷ౷߹͕ڧྗ w ݕࡧͱͯ͠͸$MPVE4FBSDI΋͋Δ &MBTUJDTFBSDIPO&$ൺֱ