Evgeny Sizikov
2011-Feb-22 18:14 UTC
[Xapian-discuss] collapsing by a key in a compound database
Hello all. I have a problem with collapsing by a key in a compound database. I have 2 databases (e.g. clients and client branches), both of them have the same attribute (with the same valueno), `client_id'. What I need is to search in both these databases and collapse results by `client_id' to get client IDs (set_collapse_key is used with collapse_max=1). The problem is that I receive 2 equal `client_id' values in the MSet (one per database?). Is it possible to get unique collapsed values when searching in a compound database?
Olly Betts
2011-Feb-23 03:23 UTC
[Xapian-discuss] collapsing by a key in a compound database
On Wed, Feb 23, 2011 at 12:14:33AM +0600, Evgeny Sizikov wrote:> I have a problem with collapsing by a key in a compound database. I have > 2 databases (e.g. clients and client branches), both of them have the > same attribute (with the same valueno), `client_id'. > > What I need is to search in both these databases and collapse results by > `client_id' to get client IDs (set_collapse_key is used with > collapse_max=1). > > The problem is that I receive 2 equal `client_id' values in the MSet > (one per database?). > > Is it possible to get unique collapsed values when searching in a > compound database?It shouldn't make a difference how many databases there are. Are you sure the client_id values are completely identical byte for byte? No whitespace differences, nor differences in how accents are encoded, etc. If there really are exactly identical, a testcase would be useful. Ideally self-contained and small enough to copy around easily. Cheers, Olly