mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
catching up with changs to main
This commit is contained in:
parent
cc907de1b6
commit
7801959822
@ -72,12 +72,8 @@ ops:
|
||||
- key2: val2
|
||||
- key3: val3
|
||||
sparse_values:
|
||||
- sparse_id: 1
|
||||
indices: list_of_ints
|
||||
values: list_of_floats
|
||||
- sparse_id: 2
|
||||
indices: list_of_ints
|
||||
values: list_of_floats
|
||||
indices: list_of_ints
|
||||
values: list_of_floats
|
||||
|
||||
# A pinecone upsert op
|
||||
upsert-example:
|
||||
@ -87,23 +83,14 @@ ops:
|
||||
upsert_vectors:
|
||||
- id: 1
|
||||
values: csv_separated_floats
|
||||
top_k: int_val
|
||||
namespace: string_val
|
||||
filter:
|
||||
filter_field: query_vector_filter_field
|
||||
operator: comparison_operator
|
||||
comparator: comparator_val
|
||||
sparse_values:
|
||||
indices: list_of_ints
|
||||
values: list_of_floats
|
||||
metadata:
|
||||
- key1: val1
|
||||
- key2: val2
|
||||
- id: 2
|
||||
values: csv_separated_floats
|
||||
top_k: int_val
|
||||
namespace: string_val
|
||||
filter:
|
||||
filter_field: query_vector_filter_field
|
||||
operator: comparison_operator
|
||||
comparator: comparator_val
|
||||
sparse_values:
|
||||
indices: list_of_ints
|
||||
values: list_of_floats
|
||||
|
@ -2,7 +2,10 @@ package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
import io.nosqlbench.adapter.pinecone.opdispensers.PineconeDeleteOpDispenser;
|
||||
import io.nosqlbench.adapter.pinecone.opdispensers.PineconeQueryOpDispenser;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeDeleteOp;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeOp;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeQueryOp;
|
||||
import io.nosqlbench.api.config.NBLabeledElement;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.engine.api.activityconfig.OpsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
@ -41,7 +44,8 @@ public class PineconeOpMapperTest {
|
||||
private static ParsedOp parsedOpFor(String yaml) {
|
||||
OpsDocList docs = OpsLoader.loadString(yaml, OpTemplateFormat.yaml, Map.of(), null);
|
||||
OpTemplate opTemplate = docs.getOps().get(0);
|
||||
return new ParsedOp(opTemplate, cfg, List.of(adapter.getPreprocessor()));
|
||||
NBLabeledElement parent = NBLabeledElement.EMPTY;
|
||||
return new ParsedOp(opTemplate, cfg, List.of(adapter.getPreprocessor()), parent);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -74,6 +78,8 @@ public class PineconeOpMapperTest {
|
||||
""");
|
||||
OpDispenser<? extends PineconeOp> dispenser = mapper.apply(pop);
|
||||
assert(dispenser instanceof PineconeQueryOpDispenser);
|
||||
PineconeOp op = dispenser.apply(0);
|
||||
assert(op instanceof PineconeQueryOp);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -91,6 +97,7 @@ public class PineconeOpMapperTest {
|
||||
OpDispenser<? extends PineconeOp> dispenser = mapper.apply(pop);
|
||||
assert(dispenser instanceof PineconeDeleteOpDispenser);
|
||||
PineconeOp op = dispenser.apply(0);
|
||||
assert(op instanceof PineconeDeleteOp);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user