[][src]Function ejdb_sys::ejdbsetindex

pub unsafe extern "C" fn ejdbsetindex(
    coll: *mut EJCOLL,
    ipath: *const c_char,
    flags: c_int
) -> bool

Set index for JSON field in EJDB collection.

Examples: - Set index for JSON path addressbook.number for strings and numbers: ejdbsetindex(ccoll, "album.number", JBIDXSTR | JBIDXNUM) - Set index for array: ejdbsetindex(ccoll, "album.tags", JBIDXARR) - Rebuild previous index: ejdbsetindex(ccoll, "album.tags", JBIDXARR | JBIDXREBLD)

Many index examples can be found in testejdb/t2.c test case.

@param coll Collection handle. @param ipath BSON field path. @param flags Index flags. @return