Skip to content

Commit 277ee70

Browse files
author
a-brandt
committed
added IndexType.PERSISTENT (issue #48)
1 parent 07a9142 commit 277ee70

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

Diff for: src/main/java/com/arangodb/entity/IndexType.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@
2020
* Index Type.
2121
*
2222
* @author tamtam180 - kirscheless at gmail.com
23-
* @see <a href=
24-
* "http://www.arangodb.com/manuals/current/HttpIndex.html#HttpIndexIntro">
25-
* HttpIndexIntro</a>
23+
* @see <a https://docs.arangodb.com/current/HTTP/Indexes/index.html">
24+
* Indexes</a>
2625
*/
2726
public enum IndexType {
2827
/** Primary Index */
@@ -36,5 +35,7 @@ public enum IndexType {
3635
/** Skiplist Index */
3736
SKIPLIST,
3837
/** Fulltext Inex */
39-
FULLTEXT
38+
FULLTEXT,
39+
/** Persistent Index */
40+
PERSISTENT
4041
}

Diff for: src/test/java/com/arangodb/ArangoDriverIndexTest.java

+16
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,22 @@ public void test_create_fulltext_index() throws ArangoException {
270270

271271
}
272272

273+
@Test
274+
public void test_create_persistent_index() throws ArangoException {
275+
276+
final IndexEntity entity = driver.createIndex(collectionName, IndexType.PERSISTENT, false, "a", "b", "c", "d",
277+
"e", "f", "g");
278+
279+
assertThat(entity, is(notNullValue()));
280+
assertThat(entity.getCode(), is(201));
281+
assertThat(entity.isError(), is(false));
282+
assertThat(entity.isNewlyCreated(), is(true));
283+
assertThat(entity.isGeoJson(), is(false));
284+
assertThat(entity.getId(), is(notNullValue()));
285+
assertThat(entity.getType(), is(IndexType.PERSISTENT));
286+
287+
}
288+
273289
@Test
274290
public void test_delete_index() throws ArangoException {
275291

0 commit comments

Comments
 (0)