Can I use a string as key in mongodb for search? -


i moving first steps in nosqldb , mongo, it, , have question indexes:

in traditional mysql dbs, find record in table id, primary key.

now in mongo can save lot of different information in text format, , know fast in search strings, let's working on cms lot of records, several millions, , each document has url, think idea pull document using that, rather id? know sound weird have reasons that, unless particularly slow.

thanks

indexes - indexes support efficient execution of queries in mongodb. create index on appropriate field used in search , retrieve documents in faster fashion.

text index - mongodb provides text indexes support text search queries on string content. text indexes can include field value string or array of string elements.

reference:

https://code.tutsplus.com/tutorials/full-text-search-in-mongodb--cms-24835


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -