Ticket #669: Search-Xapian-1.2.20.0.patch

File Search-Xapian-1.2.20.0.patch, 1.5 KB (added by Felix Ostmann, 10 years ago)
  • Search-Xapian-1.2.20.0

    diff -ru Search-Xapian-1.2.20.0.orig/Xapian/Enquire.pm Search-Xapian-1.2.20.0/Xapian/Enquire.pm
    old new  
    3434  }
    3535}
    3636
     37sub set_collapse_key {
     38  my $self = shift;
     39  my $valueno = shift;
     40  my $nargs = scalar(@_);
     41  if( $nargs > 1) {
     42    Carp::carp( "USAGE: \$enquire->set_collapse_key(\$valueno) or \$enquire->set_collapse_key(\$valueno, \$count)" );
     43    exit;
     44  }
     45  if( $nargs == 0 ) {
     46    $self->set_collapse_key1( $valueno );
     47  } else {
     48    $self->set_collapse_key2( $valueno, shift );
     49  }
     50}
     51
    3752sub get_mset {
    3853  my $self = shift;
    3954  my $nargs = scalar(@_);
  • Search-Xapian-1.2.20.0

    diff -ru Search-Xapian-1.2.20.0.orig/XS/Enquire.xs Search-Xapian-1.2.20.0/XS/Enquire.xs
    old new  
    4747       RETVAL
    4848
    4949void
    50 Enquire::set_collapse_key(collapse_key)
     50Enquire::set_collapse_key1(collapse_key)
    5151    valueno     collapse_key
    5252    CODE:
    5353       try {
     
    5555       } catch (...) {
    5656           handle_exception();
    5757       }
     58
     59void
     60Enquire::set_collapse_key2(collapse_key, count)
     61    valueno     collapse_key
     62    int         count
     63    CODE:
     64       try {
     65           THIS->set_collapse_key(collapse_key, count);
     66       } catch (...) {
     67           handle_exception();
     68       }
    5869
    5970void
    6071Enquire::set_docid_order(order)