Skip to content

Commit aa4838b

Browse files
committed
Adding in wildcard index for perf testing
1 parent 79f1bc9 commit aa4838b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/java/picoded/dstack/mongodb/MongoDB_DataObjectMap.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ public void systemSetup() {
9898
opt = opt.name("_oid");
9999
collection.createIndex(Indexes.ascending("_oid"), opt);
100100

101-
// @TODO consider wildcard index
101+
// Wildcard indexing
102+
//
103+
// This helps improve general performance for arbitary data
104+
// at a huge cost of write performance
105+
opt = new IndexOptions();
106+
opt = opt.name("wildcard");
107+
collection.createIndex(Indexes.ascending("$**"), opt);
102108
}
103109

104110
/**

0 commit comments

Comments
 (0)