ensure-index ( index-spec -- )


Vocabulary
mongodb.driver

Inputs
index-specan index specification


Outputs
None

Word description
Ensures the existence of the given index. For more information on MongoDB indexes see: https://www.mongodb.org/display/DOCS/Indexes

Examples
USING: mongodb.driver ; "db" "127.0.0.1" 27017 <mdb> [ "mycollection" nameIdx [ "name" asc ] keyspec <index-spec> ensure-index ] with-db

USING: mongodb.driver ; "db" "127.0.0.1" 27017 <mdb> [ "mycollection" nameIdx [ "name" asc ] keyspec <index-spec> t >>unique? ensure-index ] with-db


Definition