“Pencarian Teks MongoDB cocok” Kode Jawaban

Pencarian Teks MongoDB

db.stores.find( { $text: { $search: "java coffee shop" } } )
/*
  Use the $text query operator to perform text searches on 
  a collection with a text index.

  $text will tokenize the search string using whitespace and most 
  punctuation as delimiters, and perform a logical OR of all such 
  tokens in the search string.

  For example, you could use the following query to find all 
  stores containing any terms from the list "coffee", "shop", and "java":
*/
florinrelea

Pencarian Teks MongoDB cocok

Model.find({
  $text: {
  	$search: `"exact_match"`
  }
})
florinrelea

Jawaban yang mirip dengan “Pencarian Teks MongoDB cocok”

Pertanyaan yang mirip dengan “Pencarian Teks MongoDB cocok”

Lebih banyak jawaban terkait untuk “Pencarian Teks MongoDB cocok” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya