search for: constructquery

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

2018 Feb 08
7
How to ensure thread-safety
Hi, I have read the concurrency webpage from the Xapian documentation: http://getting-started-with-xapian.readthedocs.io/en/latest/concepts/concurrency.html But it is still not clear to me how to ensure thread-safety when using libxapian (C++ API). Usually when doing multi-threading many threads can read the same variable concurrently without locking provided none of the threads modifies the
2018 Apr 08
0
core dumped when using MatchAll in multi-threads
...and then merge all results together. In some case, we use Xapian::Query::MatchAll to create the query, but it always has Segmentation fault (core dumped). It looks like some pointers are double freed. This is the function that we use to create xapian-query. std::shared_ptr<Xapian::Query> constructQuery() { Xapian::Query black_list("BLt1"); return std::make_shared<Xapian::Query>(Xapian::Query::OP_AND_NOT, Xapian::Query::MatchAll, black_list); } I have wrote a demo to reproduce our problems, you can click this link for the detail. https://github.com/xiangqianzsh/xapian_...