@@ -588,6 +588,7 @@ public String deleteIndex(final String id) throws ArangoDBException {
588
588
/**
589
589
* Creates a hash index for the collection if it does not already exist.
590
590
*
591
+ * @deprecated use {@link #ensureHashIndex(Iterable, HashIndexOptions)} instead
591
592
* @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Hash.html#create-hash-index">API Documentation</a>
592
593
* @param fields
593
594
* A list of attribute paths
@@ -596,14 +597,32 @@ public String deleteIndex(final String id) throws ArangoDBException {
596
597
* @return information about the index
597
598
* @throws ArangoDBException
598
599
*/
600
+ @ Deprecated
599
601
public IndexEntity createHashIndex (final Collection <String > fields , final HashIndexOptions options )
600
602
throws ArangoDBException {
601
603
return executor .execute (createHashIndexRequest (fields , options ), IndexEntity .class );
602
604
}
603
605
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
+
604
622
/**
605
623
* Creates a skip-list index for the collection, if it does not already exist.
606
624
*
625
+ * @deprecated use {@link #ensureSkiplistIndex(Collection, SkiplistIndexOptions)} instead
607
626
* @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Skiplist.html#create-skip-list">API
608
627
* Documentation</a>
609
628
* @param fields
@@ -613,14 +632,33 @@ public IndexEntity createHashIndex(final Collection<String> fields, final HashIn
613
632
* @return information about the index
614
633
* @throws ArangoDBException
615
634
*/
635
+ @ Deprecated
616
636
public IndexEntity createSkiplistIndex (final Collection <String > fields , final SkiplistIndexOptions options )
617
637
throws ArangoDBException {
618
638
return executor .execute (createSkiplistIndexRequest (fields , options ), IndexEntity .class );
619
639
}
620
640
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
+
621
658
/**
622
659
* Creates a persistent index for the collection, if it does not already exist.
623
660
*
661
+ * @deprecated use {@link #ensurePersistentIndex(Collection, PersistentIndexOptions)} instead
624
662
* @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Persistent.html#create-a-persistent-index">API
625
663
* Documentation</a>
626
664
* @param fields
@@ -630,14 +668,33 @@ public IndexEntity createSkiplistIndex(final Collection<String> fields, final Sk
630
668
* @return information about the index
631
669
* @throws ArangoDBException
632
670
*/
671
+ @ Deprecated
633
672
public IndexEntity createPersistentIndex (final Collection <String > fields , final PersistentIndexOptions options )
634
673
throws ArangoDBException {
635
674
return executor .execute (createPersistentIndexRequest (fields , options ), IndexEntity .class );
636
675
}
637
676
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
+
638
694
/**
639
695
* Creates a geo-spatial index for the collection, if it does not already exist.
640
696
*
697
+ * @deprecated use {@link #ensureGeoIndex(Collection, GeoIndexOptions)} instead
641
698
* @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Geo.html#create-geospatial-index">API
642
699
* Documentation</a>
643
700
* @param fields
@@ -647,14 +704,33 @@ public IndexEntity createPersistentIndex(final Collection<String> fields, final
647
704
* @return information about the index
648
705
* @throws ArangoDBException
649
706
*/
707
+ @ Deprecated
650
708
public IndexEntity createGeoIndex (final Collection <String > fields , final GeoIndexOptions options )
651
709
throws ArangoDBException {
652
710
return executor .execute (createGeoIndexRequest (fields , options ), IndexEntity .class );
653
711
}
654
712
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
+
655
730
/**
656
731
* Creates a fulltext index for the collection, if it does not already exist.
657
732
*
733
+ * @deprecated use {@link #ensureFulltextIndex(Collection, FulltextIndexOptions)} instead
658
734
* @see <a href="https://docs.arangodb.com/current/HTTP/Indexes/Fulltext.html#create-fulltext-index">API
659
735
* Documentation</a>
660
736
* @param fields
@@ -664,11 +740,29 @@ public IndexEntity createGeoIndex(final Collection<String> fields, final GeoInde
664
740
* @return information about the index
665
741
* @throws ArangoDBException
666
742
*/
743
+ @ Deprecated
667
744
public IndexEntity createFulltextIndex (final Collection <String > fields , final FulltextIndexOptions options )
668
745
throws ArangoDBException {
669
746
return executor .execute (createFulltextIndexRequest (fields , options ), IndexEntity .class );
670
747
}
671
748
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
+
672
766
/**
673
767
* Returns all indexes of the collection
674
768
*
0 commit comments