search for: op_value_in

Displaying 2 results from an estimated 2 matches for "op_value_in".

Did you mean: op_value_ge
2024 Apr 26
1
queries for a set of values
...ke: std::vector<Xapian::Query> subq; for (size_t i = 0; i < nelem; i++) { std::string v = sortable_serialise(int_vals[i])); subq.insert(Query(OP_VALUE_RANGE, column, v, v)); } Query(OP_OR, subq.begin(), subq.end()); It seems what I'm really looking for is an OP_VALUE_OR or OP_VALUE_IN; but only OP_VALUE_{GE,LE,RANGE} exists. [1] Even if I switched to terms, I would still keep the numeric values since I also rely on Enquire.set_collapse_key on this column.
2024 Apr 26
2
queries for a set of values
...e(int_vals[i])); > > subq.insert(Query(OP_VALUE_RANGE, column, v, v)); > } > > Query(OP_OR, subq.begin(), subq.end()); You can build it up the same way with: filter |= Query(OP_VALUE_RANGE, column, v, v); > It seems what I'm really looking for is an OP_VALUE_OR or OP_VALUE_IN; > but only OP_VALUE_{GE,LE,RANGE} exists. Just use OP_VALUE_RANGE with equal bounds. Another approach is to use a custom PostingSource which can fetch the value for that slot for each document being considered and check if it's one of the values you want. Cheers, Olly