๐Ÿ’ BE TIL Day 32 0426

JBยท2022๋…„ 4์›” 26์ผ
0

CodeCamp BE 02

๋ชฉ๋ก ๋ณด๊ธฐ
28/30

โฌ‡๏ธ Main Note
https://docs.google.com/document/d/17KKtCXe_nuQsuk9E_6050v01H_IAHBfYQtG11G06jas/edit

โš ๏ธ Warning โš ๏ธ Today's post contains a lot of images


๐ŸŒฟ Inverted Text

(์—ญ์ƒ‰์ธ)
"Hello this is Monstershop. We are the best shop"
โžค Every single words are tokenized, and they are now tokens.

By tokenizing, elasticsearch can quickly search the words from the context.
โžค Faster than mysql (mysql searches in this format : "title":%Hello%)
โžค Full-text search (efficient for searching a sentence)
โžค "Hello" is saved as a token, so only need to get that "Hello" token.


๐ŸŒฟ Analyzer

โžค Analyzes how the searching works

Default Anlayzers
< Character-Filter > โžค removes things like ["!","~","@", "#"]
< Tokenizer > โžค splits by spaces
< Token-Filter > โžค Uppercase to lowercase


๐ŸŒฟ Elasticsearch Settings vs. Mappings

Settings:Analyzer, Tokenizer, Token-filter settings
Mappings: Set which analyzer the devloper wants to use for analyzing column

  • For mappings, once the change is set, developer cannot commit any changes.
  • But developer can add mappings.

๐ŸŒฟ Query [match / prefix]

โฌ‡๏ธ Match: Get the result that literally matches the user input(search word the use types in).

โฌ‡๏ธ Prefix: More like automatic complete search.


๐ŸŒฟ VS Code Practice

{
  "template": "*",
  "settings": {
    "analysis": {
      "analyzer": {
        "tattoo_ngram_analyzer": {
          "type": "custom",
          "tokenizer": "tattoo_ngram_tokenizer",
          "filter": ["lowercase", "my_stop_filter"]
        }
      },
      "tokenizer": {
        "tattoo_ngram_tokenizer": {
          "type": "nGram",
          "min_gram": "1",
          "max_gram": "10"
        }
      },
      "filter": {
        "my_stop_filter": {
          "type": "stop",
          "stopwords": ["the", "in", "..."]
        }
      }
    },
    "max_ngram_diff": "20"
  },

  "mappings": {
    "properties": {
      "name": {
        "type": "text"
      },
      "description": {
        "type": "text",
        "analyzer": "tattoo_ngram_analyzer"
      },
      "price": {
        "type": "long"
      }
    }
  }
}

๐ŸŒฟ Applying to Nest.js

profile
๋‘๋น„๋‘๋ฐฅ๋ฐฅ

10๊ฐœ์˜ ๋Œ“๊ธ€

comment-user-thumbnail
2025๋…„ 1์›” 2์ผ

Any movies is normally outstanding. You've gotten a lot of particularly as good writers and singers. Document prefer you will the best quality about financial success. biurka dla dzieci

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 1์›” 4์ผ

If more people that write articles involved themselves with writing great content like you, more readers would be interested in their writings. I have learned too many things from your article. fototapeta gรณry

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 1์›” 12์ผ

If more people that write articles involved themselves with writing great content like you, more readers would be interested in their writings. I have learned too many things from your article. blue mosque entrance

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 1์›” 15์ผ

Ordinary comes to visit and listed below are one way to thanks for your time for one's exertion, which inturn means that So i'm seeing this website every single day, hunting for unique, important tips. A number of, many thanks! https://isilumko.co.za/

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 1์›” 19์ผ

I assumed it is usually a preview to post in case others appeared to be having problems getting acquainted with nonetheless We're a little bit hesitant merely i'm permitted to decide to put companies plus covers for listed here. https://jrpromotions-western-cape.co.za/

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 1์›” 21์ผ

I assumed it is usually a preview to post in case others appeared to be having problems getting acquainted with nonetheless We're a little bit hesitant merely i'm permitted to decide to put companies plus covers for listed here. https://jrpromotions.co.za/

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 2์›” 6์ผ

I assumed it is usually a preview to post in case others appeared to be having problems getting acquainted with nonetheless We're a little bit hesitant merely i'm permitted to decide to put companies plus covers for listed here. ๋ฐœ์‚ฐ ์…”์ธ ๋ฃธ

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 2์›” 8์ผ

This is certainly hence attractive plus artistic. I like a colorations plus whichever company may get them while in the mailbox might be smiling. MICK GUNN COMPUTER SERVICES

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
2025๋…„ 2์›” 13์ผ

Wonderful blog post, resolved to go on and even bookmarked your webblog. As i canโ€™t hold on to enjoy a book alot more as a result of one. ์ผ์ˆ˜๋Œ€์ถœ

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ
comment-user-thumbnail
์•ฝ 14์‹œ๊ฐ„ ์ „

Wonderful article. Fascinating to read. I love to read such an excellent article. Thanks! It has made my task more and extra easy. Keep rocking.์–‘์‚ฐ ๊ธ‰์ „ ๋Œ€์ถœ

๋‹ต๊ธ€ ๋‹ฌ๊ธฐ

๊ด€๋ จ ์ฑ„์šฉ ์ •๋ณด