mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
fixed condition when find options consist of vector only
This commit is contained in:
parent
d5a96e81c4
commit
e6d2c35f5a
@ -58,6 +58,8 @@ public class DataApiFindOneOpDispenser extends DataApiOpDispenser {
|
||||
float[] vector = getVectorValues(op, l);
|
||||
if (sort != null) {
|
||||
options = vector != null ? options.sort(vector, sort) : options.sort(sort);
|
||||
} else if (vector != null) {
|
||||
options = options.sort(vector);
|
||||
}
|
||||
Projection[] projection = getProjectionFromOp(op, l);
|
||||
if (projection != null) {
|
||||
|
@ -55,8 +55,11 @@ public class DataApiFindOpDispenser extends DataApiOpDispenser {
|
||||
private FindOptions getFindOptions(ParsedOp op, long l) {
|
||||
FindOptions options = new FindOptions();
|
||||
Sort sort = getSortFromOp(op, l);
|
||||
float[] vector = getVectorValues(op, l);
|
||||
if (sort != null) {
|
||||
options = options.sort(sort);
|
||||
options = vector != null ? options.sort(vector, sort) : options.sort(sort);
|
||||
} else if (vector != null) {
|
||||
options = options.sort(vector);
|
||||
}
|
||||
Projection[] projection = getProjectionFromOp(op, l);
|
||||
if (projection != null) {
|
||||
|
@ -19,6 +19,7 @@ blocks:
|
||||
sort:
|
||||
type: "asc"
|
||||
field: "field1"
|
||||
vector: "1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0"
|
||||
projection:
|
||||
include:
|
||||
- "field1"
|
||||
|
@ -19,6 +19,7 @@ blocks:
|
||||
sort:
|
||||
type: "asc"
|
||||
field: "field1"
|
||||
vector: "1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0"
|
||||
projection:
|
||||
include:
|
||||
- "field1"
|
||||
|
Loading…
Reference in New Issue
Block a user