Skip to content

Commit

Permalink
refine the logic for checking if index exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanshah18 committed Feb 2, 2024
1 parent 6bf82f1 commit 7e42613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/integration/java/io/pinecone/helpers/IndexManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private static String findIndexWithDimensionAndType(IndexList indexList, int dim
IndexModel indexModel = isIndexReady(indexModels.get(i).getName(), controlPlaneClient);
// ToDo: add pod type support
if (indexModel.getDimension() == dimension
&& ((indexType.equalsIgnoreCase(IndexModelSpec.SERIALIZED_NAME_POD) && indexModel.getSpec().getPod().getPodType().equalsIgnoreCase("p1.x1"))
&& ((indexType.equalsIgnoreCase(IndexModelSpec.SERIALIZED_NAME_POD) && indexModel.getSpec().getPod() != null && indexModel.getSpec().getPod().getPodType().equalsIgnoreCase("p1.x1"))
|| (indexType.equalsIgnoreCase(IndexModelSpec.SERIALIZED_NAME_SERVERLESS)))) {
return indexModel.getName();
}
Expand Down

0 comments on commit 7e42613

Please sign in to comment.