MCPcopy Create free account
hub / github.com/BaseXdb/basex / createIndex

Method createIndex

basex-core/src/main/java/org/basex/data/DiskData.java:187–202  ·  view source on GitHub ↗
(final IndexType type, final Command cmd)

Source from the content-addressed store, hash-verified

185 }
186
187 @Override
188 public void createIndex(final IndexType type, final Command cmd) throws IOException {
189 // close existing index
190 close(type);
191 final IndexBuilder ib = switch(type) {
192 case TEXT, ATTRIBUTE, TOKEN -> new DiskValuesBuilder(this, type);
193 case FULLTEXT -> new FTBuilder(this);
194 default -> throw Util.notExpected();
195 };
196 try {
197 if(cmd != null) cmd.pushJob(ib);
198 set(type, ib.build());
199 } finally {
200 if(cmd != null) cmd.popJob();
201 }
202 }
203
204 @Override
205 public void dropIndex(final IndexType type) throws BaseXException {

Callers

nothing calls this directly

Calls 6

closeMethod · 0.95
notExpectedMethod · 0.95
setMethod · 0.95
buildMethod · 0.95
pushJobMethod · 0.80
popJobMethod · 0.80

Tested by

no test coverage detected