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

Sudachi×Elasticsearchへの移行と医療検索システム精度改善

4d78b749c315e21a956053dcbf0508a9?s=47 po3rin
November 26, 2021

 Sudachi×Elasticsearchへの移行と医療検索システム精度改善

4d78b749c315e21a956053dcbf0508a9?s=128

po3rin

November 26, 2021
Tweet

More Decks by po3rin

Other Decks in Programming

Transcript

  1. 4VEBDIJʷ&MBTUJDTFBSDI΁ͷҠߦͱ ҩྍݕࡧγεςϜਫ਼౓վળ hiromu-nakamura @po3rin

  2. தଜ߂෢ ΤϜεϦʔͷ"*ɾػցֶशνʔϜͰݕࡧج൫पΓ Λ୲౰͍ͯ͠Δɻ(Pͱ৘ใݕࡧ͕޷͖ɻ ֤छΞΧ΢ϯτQPSJOͰ΍ͬͯ·͢ɻ )*SPNV/BLBNVSB

  3. ΤϜεϦʔ಺ͷݕࡧج൫ΛϝΠϯʹ։ൃ͍ͯ͠ΔɻͦͷதͰ ೔ʑɺݕࡧ඼࣭վળ͕ߦΘΕ͍ͯΔɻ ఆظతʹ&MBTUJDTFBSDI-VDFOFྠಡձ΍৘ใݕࡧਪન࿦จྠಡ ձΛߦ͍ͬͯΔɻ ΤϜεϦʔݕࡧج൫νʔϜ

  4. ฐࣾͷݕࡧͷ՝୊ͱͯ͠ දه༳Ε ෳ߹ޠͷ෼ׂ໰୊ ͕ڍ͛ΒΕΔɻ ՝୊

  5. ҩྍυϝΠϯ͸ಛʹදه༳Ε͕ଟ͘ɺྫ͑͹ʮң͕ΜңΨϯң؞ʯͳͲͷฏԾ໊ ΧλΧφ׽ࣈͷ༳Ε͕͋Δɻ දه༳Ε  Ψϯʹͳͬͨ ΨϯʹͳΔ ͕Μ ώοτ͠ͳ͍ʂ *OEFY

  6. ,VSPNPKJͰ͸γϊχϜͰશͯͷઐ໳༻ޠͷදه༳ΕΛఆٛͯ͠ٵऩ͢Δͱ͍͏ର ࡦ͕͋Δ͕ɺҩྍ༻ޠͷදه༳Εύλʔϯ͸ඇৗʹଟ͘ɺશͯΛγϊχϜࣙॻͰ· ͔ͳ͏ͷ͸ࠔ೉ɻ දه༳Ε 

  7. ҩྍ༻ޠ͸ෳ߹ޠ ͭҎ্ͷ୯ޠ͕࿈݁ͯ͠ɺผͷͭͷޠΛܗ଄ͬͨ΋ͷ ͕ඇৗʹଟ͘ɺ͜Ε͕͠͹͠͹໰୊ͱͳ Δɻྫ͑͹ʮ࿑࡞ੑڱ৺঱ףಈ຺εςϯτཹஔޙʯΛ୯७ʹࣙॻʹొ࿥͢Δͱɺʮڱ৺঱ʯͰʮ࿑࡞ੑڱ৺঱ףಈ຺ εςϯτཹஔޙʯ͕ώοτ͠ͳ͍ɻ ෳ߹ޠͷ෼ׂ໰୊  ࿑࡞ੑڱ৺঱ףಈ຺εςϯτཹஔޙ ڱ৺঱ ώοτ͠ͳ͍ʂ

    *OEFY ࿑࡞ੑڱ৺঱ףಈ຺εςϯτཹஔޙ
  8. ͳͥલͷྫ͕ώοτ͠ͳ͍͔ͱ͍͏ͱɺ,VSPNPKJ͸Ϣʔβʔࣙॻʹ࿈઀ίετΛؚΉࣄ ͕Ͱ͖ͣɺϢʔβʔࣙॻʹఆٛͯ͋͠Δ୯ޠͷ୯ҐͰඞͣܗଶૉղੳ͞Εͯ͠·͏ͨΊͰ ͋Δɻ ෳ߹ޠͷ෼ׂ໰୊  ,VSPNPKJʹؔͯ͠͸OCFTU<>Ͱ੾͍ͬͯ͘ํ๏͕ڍ͛ΒΕ·͕͢ɺ࠷దͳෳ߹ޠͷ෼ ׂʹͳ͍ͬͯͳ͍ࣄ͕ଟ͘ɺ͓͔͠ͳݕࡧ݁Ռʹͳͬͯ͠·͏ࣄ͕͋Δɻ <>IUUQTXXXFMBTUJDDPHVJEFFOFMBTUJDTFBSDIQMVHJOTDVSSFOUBOBMZTJTLVSPNPKJUPLFOJ[FSIUNM Ψϯόϧ Ψϯόϧ

    Ψϯόϧ ώοτ͠ͳ͍ʂ ʮΨϯʯ͕ࣙॻʹ͋Δ
  9. ·ͱΊΔͱզʑͷ8"/5͸Լهʹू໿͞Ε·͢ɻ w ҩྍ༻ޠͷදه༳ΕʹରԠ͍ͨ͠ w ҩྍෳ߹ޠͷࣙॻΛਖ਼͘͠෼ׂ͍ͨ͠ ղܾ͍ͨ͜͠ͱ

  10. 4VEBDIJ

  11. 4VEBDIJ  ң͕Μʹͳͬͨ ң؞ʹͳΔ ң؞ *OEFY 4VEBDIJͰ͸ॊೈͳϢʔβʔࣙॻఆٛɺਖ਼نԽػೳ͕૊Έࠐ·Ε͓ͯΓɺզʑ͕࣋ͭ՝୊ ͱඇৗʹ૬ੑ͕ྑ͍ɻྫ͑͹ʮң͕Μʯ΍ʮңΨϯʯ͸ʮң؞ʯʹσϑΥϧτͰਖ਼نԽ Ͱ͖Δɻ ώοτ͢Δ

  12. ΧελϜࣙॻʹਖ਼نԽΛ૊ΈࠐΉ͜ͱ͕Ͱ͖ɺ͞Βʹ࿈઀ίετ΋ͪ͜ΒͰௐ੔Մ ೳɻ·ͨෳ਺෼ׂՄೳɻ 4VEBDIJ  ൃ࡞ੑ৺๪ࡉಈ͸৺ଁͷதͷ ൃ࡞ੑ৺๪ࡉಈൃ࡞ੑ৺๪ࡉಈ ͸৺ଁͷதͷ ʮൃ࡞ੑ৺๪ࡉಈʯ͕ ࣙॻొ࿥͞Ε͍ͯΔͱ͖ ৺๪ࡉಈ

    ώοτ͢Δʂ Ψϯόϧ Ψϯόϧ Ψϯόϧ ώοτ͢Δʂ ʮΨϯʯ͕ࣙॻʹ͋ͬͯ΋ Ψϯόϧͷίετͷํ͕௿͍ͷͰ Ψϯόϧ͕Ұ୯ޠ
  13. ͢Ͱʹ&MBTUJDTFBSDIΛӡ༻͍ͯ͠Δ৔߹͸ɺطଘͷࣙॻ΍γϊχϜࣙॻ͕͢Ͱʹଘࡏ͠ɺͦΕΒͷطଘϦ ιʔεΛҠߦ͢Δͷ͸গ͠खલͷ͔͔Δ࡞ۀͰ͢ɻզʑͷҠߦͰ͸ҎԼͷҠߦϓϩηεΛ౿Έ·ͨ͠ɻ w ࠓ࢖͍ͬͯΔ,VSPNPKJϢʔβʔࣙॻΛ4VEBDIJϢʔβʔࣙॻʹҠߦ͢Δ w ࠓ࢖͍ͬͯΔγϊχϜࣙॻ͔Β4VEBDIJਖ਼نԽػೳͰ࿫͑Δ΋ͷΛ࡟আ͢Δ w ฏԾ໊ΧλΧφͷਖ਼نԽࣙॻΛ࡞Δ w Ҡߦ࣌ͷ4VEBDIJ੾Γସ͑ઓུ

    w ҠߦޙͷӨڹͷࣄલ֬ೝ ͔͜͜Β͸࣮ࡍʹΤϜεϦʔݕࡧج൫νʔϜ͕ͲͷΑ͏ʹ4VEBDIJʹҠߦ͔ͨ͠Λ͓࿩͠͠·͢ɻ 4VEBDIJ΁ͷҠߦ
  14. 4VEBDIJϢʔβʔࣙॻʹҠߦ͢Δ 4VEBDIJʹҠߦ͢Δࡍʹ͢Ͱʹӡ༻͍ͯ͠ΔϢʔβʔࣙॻ͕͋ΔͳΒͦΕΛ4VEBDIJࣙॻʹม ׵͢Δඞཁ͕͋Δɻ ݕࡧج൫νʔϜͰ։ൃͨ͠LVSPTVEBDIJͱ͍͏ࣙॻม׵πʔϧΛ࢖ͬͯࣙॻͷҠߦ͠·͠ ͨɻ͜ͷπʔϧ͸044ͱͯ͠ެ։͍ͯ͠·͢ɻ

  15. 4VEBDIJϢʔβʔࣙॻʹ Ҡߦ͢Δ LVSPTVEBDIJΛ࢖͏ͱɺม׵ํ๏Λ+40/Ͱࢦ ఆ͢Δ͚ͩͰɺ࿈઀ίετ෇༩ɺ෼ׂϞʔυఆ ٛࡁΈͷ4VEBDIJࣙॻ͕खʹೖΔɻ LVSPTVEBDIJͷ಺෦Ͱ͸4VEBDIJ1ZΛϞ δϡʔϧͱͯ͠ར༻͠ɺܗଶૉղੳͨ݁͠ՌΛ ෼ׂ৘ใͱͯ͠ొ࿥͍ͯ͠Δɻ

  16. ࠓ࢖͍ͬͯΔγϊχϜࣙॻ͔Β 4VEBDIJਖ਼نԽػೳͰ·͔ͳ͑Δ΋ͷΛ࡟আ͢Δ  4VEBDIJͷਖ਼نԽͰࣄ଍ΓΔ໊دͤΛγϊχϜʹఆٛ͢Δඞཁ͸ͳ͍ͷͰɺͦΕΒΛ࡟আ͍ͯܰ͠γϊχϜࣙॻʹ͠ ͍͖͍ͯͨͱ͜ΖͰ͢ɻྫ͑͹ฐࣾͷγϊχϜࣙॻʹ͸ʮͨΜͺ࣭͘ ୿ന࣭ʯͱ͍͏ఆ͕ٛ͋Γ·͕ͨ͠ɺ͜Ε͸ 4VEBDIJͷਖ਼نԽͰ༳ΕΛٵऩͰ͖·͢ɻ

  17. ࠓ࢖͍ͬͯΔγϊχϜࣙॻ͔Β 4VEBDIJਖ਼نԽػೳͰ·͔ͳ͑Δ΋ͷΛ࡟আ͢Δ  ࠓճͷҠߦͰ͸ࢲ͕044ͱͯ͠ެ։͍ͯ͠ΔDIJOPSN fi MUFSͱ͍͏πʔϧΛ࢖ͬͯ͜ΕΛ࣮ݱ͠·ͨ͠ɻ

  18. ฏԾ໊ΧλΧφͷਖ਼نԽࣙॻΛ࡞Δ  4VEBDIJͰ͸͋Δఔ౓ฏԾ໊ΧλΧφ׽ࣈͷදه༳ΕʹରԠͯ͘͠Ε·͕͢ɺશͯʹରԠͯ͘͠ΕΔ ༁Ͱ͸͋Γ·ͤΜɻྫ͑͹ʮ͜Εͯ͢ΖʔΔʯ͸4VEBDIJࣙॻͰະఆٛͰ͋Γɺܗଶૉղੳ͢Δͱ͓ ͔͠ͳ݁ՌʹͳΓ·͢ɻ

  19. ฏԾ໊ΧλΧφͷਖ਼نԽࣙॻΛ࡞Δ  ͦ͜ͰࠓճͷҠߦʹ߹ΘͤͯฏԾ໊ΛΧλΧφʹਖ਼نԽͨ͠4VEBDIJϢʔβʔࣙॻΛੜ੒͢ΔIJSBLBOBEJD ͱ͍͏πʔϧΛ࡞ͬͨɻฏԾ໊ΛશͯγϊχϜͰఆٛ͢Δํ๏΋͋Δ͕ɺ͜ͷΑ͏ʹ4VEBDIJϢʔβʔࣙॻ Ͱਖ਼نԽΛఆٛͨ͠ํ͕4VEBDIJͷํ਑ʹ߹ΘͤΒΕΔͷͰɺ͜ͷํ๏Λ࠾༻͍ͯ͠Δɻ

  20. Ҡߦ࣌ͷ4VEBDIJ੾Γସ͑ઓུ Ҡߦઓུͱͯ͠&MBTUJDTFBSDIͷNVMUJ fi FME<>ʹΑΔ"#ςετɺ੾Γସ͑ํ๏Λ࠾༻ͨ͠ɻ͜ΕͰಉ͡ϑΟʔϧυʹෳ਺ ͷํ๏ͰυΩϡϝϯτΛ֨ೲ͢ΔΑ͏ʹઃఆͰ͖Δɻ͜͏͓ͯ͘͠ͱ"OBMZ[FSҠߦ࣌ͷӨڹൣғΛ࠷খݶʹͰ͖Δɻ <>IUUQTXXXFMBTUJDDPHVJEFFOFMBTUJDTFBSDIQMVHJOTDVSSFOUBOBMZTJTLVSPNPKJUPLFOJ[FSIUNM

  21. Ҡߦ݁Ռ  γεςϜࣙॻͷॆ࣮౓

  22. Ҡߦ݁Ռ  ਖ਼نԽ

  23. Ҡߦ݁Ռ  ෼ׂ৘ใఆٛ

  24. ·ͱΊ &MBTUJDTFBSDIͰ4VEBDIJΛར༻͢Δํ๏ͱɺΤϜεϦʔݕࡧج൫νʔϜͰ,VSPNPKJ͔Β4VEBDIJʹҠߦ ͨ͠࿩Λͨ͠ɻ4VEBDIJʹҠߦͯ͠ݕࡧͷମݧ͕ඇৗʹྑ͘ͳ͕ͬͨɺ·ͩཧ૝ͷҩྍݕࡧΤϯδϯͱ͸ ݴ͑ͳ͍ͷͰɺ͜Ε͔Β΋ͲΜͲΜݕࡧվળΛ͍͍ͯͨ͠ɻ Ҡߦ࣌ʹ࡞ͬͨπʔϧ΋044ͱͯ͠ެ։͍ͯ͠ΔͷͰ13͓଴͓ͪͯ͠Γ·͢ʂ

  25. ϒϩάʹৄࡉΛॻ͖·ͨ͠ɻ IUUQTXXXNUFDICMPHFOUSZTVEBDIJFT ࠓ೔঺հͰ͖ͳ͔ͬͨϋϚΓϙΠϯτ΍4VEBDIJ ʹग़ͨ͠13ͷ࿩ͳͲ΋͋Γ·͢ɻ

  26. ҩྍࣗવݴޠॲཧʹڵຯΛ࣋ͬͨΒ

  27. ΤϜεϦʔ͸ੵۃ࠾༻தʂʂʂʂ ·ͣ͸ΧδϡΞϧ໘ஊ͔ΒͰ΋ʂʂ

  28. 4VEBDIJʷ&MBTUJDTFBSDI΁ͷҠߦͱ ҩྍݕࡧγεςϜਫ਼౓վળ hiromu-nakamura @po3rin