[Xapian-discuss] ValueCountMatchSpy with collapse_key

James Aylett james-xapian at tartarus.org
Sun Oct 7 17:48:00 BST 2012


Someone else may be able to confirm this, but I think the problem is that MatchSpy instances get called very low down in the matcher stack, while collapsing happens at a much higher level. Given that collapsing is relatively simple, it should be pretty easy to provide an alternative to ValueCountMatchSpy which takes collapsing into account as well.

If you wanted to make the alterations to the existing implementation, it'd be great if you could contribute them back under suitable licenses (see HACKING) so others can benefit. It would probably make sense for us only to have one implementation, with collapsing support being an option – but others should weigh in on this, as a maybe a better way to present this.

If C++ isn't your thing, you may have to wait for someone to have time – unless someone can come up with another way of tackling this.

James

On 7 Oct 2012, at 06:11, Matthew Story <matthewstory at gmail.com> wrote:

> Using the python bindings, I'm having some interesting results with
> faceting on an enquire with collapse key set.  The issue is that the
> ValueCountMatchSpy results seem to tally the uncollapsed set, not the
> collapsed set.
> 
> Any way around this?  Can provide example code if necessary, but I can
> reliably produce the correct number of facets against the correct results
> set by toggling set_collapse_key, and I have verified that the inspection
> size is the doc count, to ensure no estimation is occurring.
> 
> Thanks.
> 
> -- 
> regards,
> matt
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss

-- 
 James Aylett, occasional trouble-maker
 xapian.org




More information about the Xapian-discuss mailing list