@@ -760,8 +760,17 @@ public IndexModel configurePodsIndex(String indexName, DeletionProtection deleti
760
760
* import org.openapitools.control.client.model.IndexModel;
761
761
* ...
762
762
*
763
+ * HashMap<String, String> tags = new HashMap<>();
764
+ * tags.put("env", "test);
765
+ *
766
+ * ConfigureIndexRequestEmbed embed = new ConfigureIndexRequestEmbed();
767
+ * embed.model("multilingual-e5-large");
768
+ * HashMap<String, String> fieldMap = new HashMap<>();
769
+ * fieldMap.put("text", "your-text-field");
770
+ * embed.fieldMap(fieldMap);
771
+ *
763
772
* // Make a configuration change
764
- * IndexModel indexModel = client.configureServerlessIndex("YOUR-INDEX", DeletionProtection.ENABLED);
773
+ * IndexModel indexModel = client.configureServerlessIndex("YOUR-INDEX", DeletionProtection.ENABLED, tags, embed );
765
774
*
766
775
* // Call describeIndex to see the index status as the change is applied.
767
776
* indexModel = client.describeIndex("YOUR-INDEX");
@@ -770,10 +779,16 @@ public IndexModel configurePodsIndex(String indexName, DeletionProtection deleti
770
779
* @param indexName The name of the index to configure.
771
780
* @param deletionProtection Enable or disable deletion protection for the index.
772
781
* @param tags A map of tags to associate with the Index.
782
+ * @param embed Convert an existing index to an integrated index by specifying the embedding model and field_map.
783
+ * The index vector type and dimension must match the model vector type and dimension, and the index
784
+ * similarity metric must be supported by the model
773
785
* @return {@link IndexModel} representing the configured index.
774
786
* @throws PineconeException if an error occurs during the operation, the index does not exist, or if any of the arguments are invalid.
775
787
*/
776
- public IndexModel configureServerlessIndex (String indexName , DeletionProtection deletionProtection , Map <String , String > tags ) throws PineconeException {
788
+ public IndexModel configureServerlessIndex (String indexName ,
789
+ DeletionProtection deletionProtection ,
790
+ Map <String , String > tags ,
791
+ ConfigureIndexRequestEmbed embed ) throws PineconeException {
777
792
if (indexName == null || indexName .isEmpty ()) {
778
793
throw new PineconeValidationException ("indexName cannot be null or empty" );
779
794
}
@@ -786,6 +801,10 @@ public IndexModel configureServerlessIndex(String indexName, DeletionProtection
786
801
configureIndexRequest .tags (tags );
787
802
}
788
803
804
+ if (embed != null ) {
805
+ configureIndexRequest .embed (embed );
806
+ }
807
+
789
808
IndexModel indexModel = null ;
790
809
try {
791
810
indexModel = manageIndexesApi .configureIndex (indexName , configureIndexRequest );
0 commit comments