Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kderusso committed Dec 16, 2024
1 parent d28cd8b commit 05c45e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,5 @@ public Map<String, List<String>> getInferenceIdsIndices() {
)
);
}

// public String getSearchInferenceId() {
// List<String> searchInferenceIds = inferenceIndicesMetadata.values()
// .stream()
// .map(InferenceFieldMetadata::getSearchInferenceId)
// .distinct()
// .toList();
// if (searchInferenceIds.size() > 1) {
// throw new IllegalStateException(
// "Conflicting searchInferenceIds for field [" + fieldName + "]: Found [" + searchInferenceIds + "]"
// );
// }
// return searchInferenceIds.getFirst();
// }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,25 @@ setup:

- match: { status: 400 }

---
"Test sparse_vector returns an error if inference ID not specified with query":
- do:
catch: bad_request # This is for BWC, the actual error message is tested in a subsequent test
search:
index: index-with-sparse-vector
body:
query:
sparse_vector:
field: text
query: "octopus comforter smells"

- match: { status: 400 }

---
"Test sparse_vector requires an inference ID to be specified on sparse_vector fields":
- requires:
cluster_features: [ "search.semantic_sparse_vector_query_rewrite_interception_supported" ]
reason: "Error message changed in 8.18"
- do:
catch: /inference_id required to perform vector search on query string/
search:
Expand Down

0 comments on commit 05c45e2

Please sign in to comment.