Displaying 2 results from an estimated 2 matches for "more_term".
Did you mean:
more_terms
2024 Apr 26
2
queries for a set of values
...::set<std::string> terms;
>
> // notmuch populates terms via terms.insert(*i)...
>
> Query(OP_OR, terms.begin(), terms.end());
The slicker way to do this (unless you need the std::set for other
reasons) would be:
Xapian::Query filter = Xapian::Query::MatchAll;
while (more_terms()) {
filter |= Xapian::Query(get_next_term());
}
Assuming you're using Xapian >= 1.4.10 then |= on an OP_OR Query with
refcount 1 (as here) is specially optimised and just appends a new
subquery so you get a single OP_OR node and this is particularly
efficient (if the refcount...
2024 Apr 26
1
queries for a set of values
I probably should've used boolean terms in addition to numeric
values when indexing, but currently I have a set of numeric
values[1] and trying to avoid having to reindex ~250GB DBs
(and asking numerous users to do the same).
Say I have a bunch of values which I want to filter a query against.
If I had boolean terms, it could just OP_OR against the whole set.
IOW, this is what notmuch does