@@ -588,6 +588,7 @@ public String deleteIndex(final String id) throws ArangoDBException {
588588 /**
589589 * Creates a hash index for the collection if it does not already exist.
590590 *
591+ * @deprecated use {@link #ensureHashIndex(Iterable, HashIndexOptions)} instead
591592 * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Hash.html#create-hash-index">API Documentation</a>
592593 * @param fields
593594 * A list of attribute paths
@@ -596,14 +597,32 @@ public String deleteIndex(final String id) throws ArangoDBException {
596597 * @return information about the index
597598 * @throws ArangoDBException
598599 */
600+ @ Deprecated
599601 public IndexEntity createHashIndex (final Collection <String > fields , final HashIndexOptions options )
600602 throws ArangoDBException {
601603 return executor .execute (createHashIndexRequest (fields , options ), IndexEntity .class );
602604 }
603605
606+ /**
607+ * Creates a hash index for the collection if it does not already exist.
608+ *
609+ * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Hash.html#create-hash-index">API Documentation</a>
610+ * @param fields
611+ * A list of attribute paths
612+ * @param options
613+ * Additional options, can be null
614+ * @return information about the index
615+ * @throws ArangoDBException
616+ */
617+ public IndexEntity ensureHashIndex (final Iterable <String > fields , final HashIndexOptions options )
618+ throws ArangoDBException {
619+ return executor .execute (createHashIndexRequest (fields , options ), IndexEntity .class );
620+ }
621+
604622 /**
605623 * Creates a skip-list index for the collection, if it does not already exist.
606624 *
625+ * @deprecated use {@link #ensureSkiplistIndex(Collection, SkiplistIndexOptions)} instead
607626 * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Skiplist.html#create-skip-list">API
608627 * Documentation</a>
609628 * @param fields
@@ -613,14 +632,33 @@ public IndexEntity createHashIndex(final Collection<String> fields, final HashIn
613632 * @return information about the index
614633 * @throws ArangoDBException
615634 */
635+ @ Deprecated
616636 public IndexEntity createSkiplistIndex (final Collection <String > fields , final SkiplistIndexOptions options )
617637 throws ArangoDBException {
618638 return executor .execute (createSkiplistIndexRequest (fields , options ), IndexEntity .class );
619639 }
620640
641+ /**
642+ * Creates a skip-list index for the collection, if it does not already exist.
643+ *
644+ * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Skiplist.html#create-skip-list">API
645+ * Documentation</a>
646+ * @param fields
647+ * A list of attribute paths
648+ * @param options
649+ * Additional options, can be null
650+ * @return information about the index
651+ * @throws ArangoDBException
652+ */
653+ public IndexEntity ensureSkiplistIndex (final Iterable <String > fields , final SkiplistIndexOptions options )
654+ throws ArangoDBException {
655+ return executor .execute (createSkiplistIndexRequest (fields , options ), IndexEntity .class );
656+ }
657+
621658 /**
622659 * Creates a persistent index for the collection, if it does not already exist.
623660 *
661+ * @deprecated use {@link #ensurePersistentIndex(Collection, PersistentIndexOptions)} instead
624662 * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Persistent.html#create-a-persistent-index">API
625663 * Documentation</a>
626664 * @param fields
@@ -630,14 +668,33 @@ public IndexEntity createSkiplistIndex(final Collection<String> fields, final Sk
630668 * @return information about the index
631669 * @throws ArangoDBException
632670 */
671+ @ Deprecated
633672 public IndexEntity createPersistentIndex (final Collection <String > fields , final PersistentIndexOptions options )
634673 throws ArangoDBException {
635674 return executor .execute (createPersistentIndexRequest (fields , options ), IndexEntity .class );
636675 }
637676
677+ /**
678+ * Creates a persistent index for the collection, if it does not already exist.
679+ *
680+ * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Persistent.html#create-a-persistent-index">API
681+ * Documentation</a>
682+ * @param fields
683+ * A list of attribute paths
684+ * @param options
685+ * Additional options, can be null
686+ * @return information about the index
687+ * @throws ArangoDBException
688+ */
689+ public IndexEntity ensurePersistentIndex (final Iterable <String > fields , final PersistentIndexOptions options )
690+ throws ArangoDBException {
691+ return executor .execute (createPersistentIndexRequest (fields , options ), IndexEntity .class );
692+ }
693+
638694 /**
639695 * Creates a geo-spatial index for the collection, if it does not already exist.
640696 *
697+ * @deprecated use {@link #ensureGeoIndex(Collection, GeoIndexOptions)} instead
641698 * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Geo.html#create-geospatial-index">API
642699 * Documentation</a>
643700 * @param fields
@@ -647,14 +704,33 @@ public IndexEntity createPersistentIndex(final Collection<String> fields, final
647704 * @return information about the index
648705 * @throws ArangoDBException
649706 */
707+ @ Deprecated
650708 public IndexEntity createGeoIndex (final Collection <String > fields , final GeoIndexOptions options )
651709 throws ArangoDBException {
652710 return executor .execute (createGeoIndexRequest (fields , options ), IndexEntity .class );
653711 }
654712
713+ /**
714+ * Creates a geo-spatial index for the collection, if it does not already exist.
715+ *
716+ * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Geo.html#create-geospatial-index">API
717+ * Documentation</a>
718+ * @param fields
719+ * A list of attribute paths
720+ * @param options
721+ * Additional options, can be null
722+ * @return information about the index
723+ * @throws ArangoDBException
724+ */
725+ public IndexEntity ensureGeoIndex (final Iterable <String > fields , final GeoIndexOptions options )
726+ throws ArangoDBException {
727+ return executor .execute (createGeoIndexRequest (fields , options ), IndexEntity .class );
728+ }
729+
655730 /**
656731 * Creates a fulltext index for the collection, if it does not already exist.
657732 *
733+ * @deprecated use {@link #ensureFulltextIndex(Collection, FulltextIndexOptions)} instead
658734 * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Fulltext.html#create-fulltext-index">API
659735 * Documentation</a>
660736 * @param fields
@@ -664,11 +740,29 @@ public IndexEntity createGeoIndex(final Collection<String> fields, final GeoInde
664740 * @return information about the index
665741 * @throws ArangoDBException
666742 */
743+ @ Deprecated
667744 public IndexEntity createFulltextIndex (final Collection <String > fields , final FulltextIndexOptions options )
668745 throws ArangoDBException {
669746 return executor .execute (createFulltextIndexRequest (fields , options ), IndexEntity .class );
670747 }
671748
749+ /**
750+ * Creates a fulltext index for the collection, if it does not already exist.
751+ *
752+ * @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Fulltext.html#create-fulltext-index">API
753+ * Documentation</a>
754+ * @param fields
755+ * A list of attribute paths
756+ * @param options
757+ * Additional options, can be null
758+ * @return information about the index
759+ * @throws ArangoDBException
760+ */
761+ public IndexEntity ensureFulltextIndex (final Iterable <String > fields , final FulltextIndexOptions options )
762+ throws ArangoDBException {
763+ return executor .execute (createFulltextIndexRequest (fields , options ), IndexEntity .class );
764+ }
765+
672766 /**
673767 * Returns all indexes of the collection
674768 *
0 commit comments