(Full Text MongoDB Search)
Hello, I put some fields in the index, and here is how I could search for search_keyword .
BasicDBObject search = new BasicDBObject("$search", "search_keyword"); BasicDBObject textSearch = new BasicDBObject("$text", search); DBCursor cursor = users.find(textSearch);
I do not want to search search_keyword in all fields specified in the index. * Is there a way to specify search_keyword to search in specific fields from the index ?? *
If yes, please give me some idea on how to do this in Java .
Thank.
, . , companyName. $text , companyName, .
companyName
$text
, $text . , . $text , $text. regex.
regex
MongoDB , , , . ElasticSearch . .
Source: https://habr.com/ru/post/1547618/More articles:Django Media on Heroku, Boto or Cloudinary - django"Pre-Emptive" Basic Auth for Spring -WS Client - spring-wsApply rotation to HEALPix map in healpy - pythonWebServiceTemplate with Basic Auth using HttpComponentsMessageSender - springSQL using CASE in count and group by - sqlExtending custom HTML elements with Polymer - domHow to convert and save healpy map to another coordinate system? - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1547621/assigning-weights-to-the-values-externally-in-mongodb-using-java&usg=ALkJrhjYw01mDsMQ9-DAZrsZTCbTy8JlvAAndroid 4.1 viewport scaling (setInitialScale, meta-initial scale does not work) - android"Node Detection Disabled" in elastic search mode - elasticsearchAll Articles