Opened 10 years ago
Closed 10 years ago
#669 closed defect (fixed)
perl binding for set_collapse_key incomplete
Reported by: | Felix Ostmann | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.2.21 |
Component: | Search::Xapian | Version: | 1.2.20 |
Severity: | normal | Keywords: | set_collapse_key, perl, bug |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
The bindings for perl only accept the call to set_collapse_key() with one parameter (VALUE_NO).
The call with a second parameter COUNT is not working.
Caught exception in ... Usage: Search::Xapian::Enquire::set_collapse_key(THIS, collapse_key) at ...
We need this feature to collapse by source with more than 1 result. Idea from http://xapian.org/docs/collapsing.html
Attachments (1)
Change History (6)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Severity: | major → normal |
---|
Could you attach a patch of the changes you made?
comment:3 by , 10 years ago
first i tried to patch via github, but i dont understand the system behind the xs-generating.
so here is my patch without a test :-/
by , 10 years ago
Attachment: | Search-Xapian-1.2.20.0.patch added |
---|
comment:4 by , 10 years ago
Milestone: | → 1.2.21 |
---|---|
Status: | new → assigned |
This is already implemented in the SWIG-based Perl bindings on master - I've added a testcase to confirm this in [a44c59df66da187e4a9f24011e07766dfb9bb483].
Marking for 1.2.21 - backport new testcase and apply patch.
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in 1.2 branch by [4e1c85fff4db1651bf36f4e34c85d2034049ff5f].
Thanks very much for the patch, but I went for the simpler approach of just specifying the optional parameter in Enquire.xs directly.
i simple copied the set_query/set_query1/set_query2 from
Search/Enquire.pm
ANDXS/Enquire.xs
and changedlen
tocount
andtermcount len
toint count
and it is working (with 1.2.12 core and 1.2.20 perl-binding).