private static boolean isCompatible(TensorType fieldTensorType, TensorType queryTensorType) {
            // Precondition: isTensorTypeThatSupportsHnswIndex(fieldTensorType)
            var queryDimensions = queryTensorType.dimensions();
            if (queryDimensions.size() == 1) {
                var queryDimension = queryDimensions.get(0);
                var fieldDimensions = fieldTensorType.dimensions();
                for (var fieldDimension : fieldDimensions) {
                    if (fieldDimension.isIndexed()) {
                        return fieldDimension.equals(queryDimension);
                    }
                }
            }
            return false;
        }
Validates any NearestNeighborItem query items.

@author arnej
container-search/src/main/java/com/yahoo/search/searchers/ValidateNearestNeighborSearcher.java