wangbeb1227
@wangbeb1227
Reviews Written
-
Average Rating
-
Posts
Q&A
๋ฐฐ์ด์ ๋ด๊น ๊ฐ๋ search๋ฅผ ํ๊ณ ์ถ์๋ฐ ์ด๋ป๊ฒ ํด์ผํ๋์?
//๊ฒ์ ๊ธฐ๋ฅ์์ ๊ฒ์ ์ฐ์ ์์ ์ค์ productSchema.index({ title: 'text', description: 'text', keywords: 'text' },{ weights:{ title:5, description: 3, keywords: 1 } }) const Product = mongoose.model('Product', productSchema); module.exports = { Product } ์ถ๊ฐํด๋ ์๋๊ธธ๋ ARRAY์ ๊ฐ์ธ์ ธ์์ด์ ์๋๋๊ฑด๊ฐ ์ถ์ด์ ์ง๋ฌธ๋๋ ธ๋๋ฐ ARRAY์ ์๋ ๊ฐ์ ๊ฒ์ํ ๋๋ ๋๊ฐ์ด keywords: 'text' ํ๋ฉด ๋๋ค๋ ๋ง์์ด์ ๊ฐ์?
- 0
- 3
- 262
Q&A
์ฌ์ง์ด ์ ๋ก๋๋ ๋๋๋ฐ ์๋ฐ์ด ๋น๋๋ค.
๊ฐ์ ๋ฌธ์ ๊ฐ ์ ๋ ๋ฐ์ํ์๋๋ฐ src={`http://localhost:5000/${image}`} ์ด๋ถ๋ถ์ src={`http://localhost:5000/${image.filePath}`} ๊ฐ์๋๋ก ์ํ๊ณ filePath๋ก ํ๋ ์๋ฐ์ด ๋จ๋๊ตฐ์
- 0
- 3
- 1.3K




