Home > Back-end >  The boot mongoTemplate find query full-text index is invalid?
The boot mongoTemplate find query full-text index is invalid?

Time:11-27

Beginning with mongo, in one form a field and add the text full-text index, but found on the client side is feasible, but application is not?
I don't know when using a mongoTemplate what writing?


Is currently in use and common query fields as writing:
MongoTemplate. Find (query, enclosing getEntityClass ());

Don't know how to write full text indexing query is'
'
To solve the???

CodePudding user response:

Have a great god appeared not?

CodePudding user response:

Has been solved,


Db. The list. The find ({' code ':' testname ', '$text: {$search:' 3120980105 '}}); It is ok to full-text index with $text directly;

Want to do is to encapsulate the {' code ':' testname ', '$text: {$search:' 3120980105 '}}

CodePudding user response:

Is that how to complete the final encapsulated, mongo. Core. If could not find the corresponding methods in the query object,
  • Related