[Xapian-tickets] [Xapian] #158: Query::MatchNothing and Query::MatchAll aren't wrapped

Xapian nobody at xapian.org
Tue Dec 16 15:28:51 GMT 2008


#158: Query::MatchNothing and Query::MatchAll aren't wrapped
-----------------------------+----------------------------------------------
 Reporter:  richard          |        Owner:  olly     
     Type:  defect           |       Status:  assigned 
 Priority:  normal           |    Milestone:  1.1.1    
Component:  Xapian-bindings  |      Version:  SVN trunk
 Severity:  normal           |   Resolution:           
 Keywords:                   |    Blockedby:           
 Platform:  All              |     Blocking:           
-----------------------------+----------------------------------------------
Changes (by olly):

  * milestone:  1.1.0 => 1.1.1


Old description:

> The obvious patch for this (below) doesn't work - in Python, you get a
> property
> of xapian.Query() added, which means that you have to instantiate
> xapian.Query
> to get at MatchNothing (ie, xapian.Query().MatchNothing works, but
> xapian.Query.MatchNothing doesn't).  It should be easy enough to fix this
> with a
> python specific workaround though.
>
> PHP also doesn't work; I can't seem to access the resulting function at
> all, but
> this may be more due to my lack of PHP knowledge.
>
> I've not tested for other languages yet.
>
> Index: xapian.i
> ===================================================================
> --- xapian.i    (revision 8676)
> +++ xapian.i    (working copy)
> @@ -871,6 +871,9 @@
>
>         ~Query();
>
> +       static Xapian::Query MatchAll;
> +       static Xapian::Query MatchNothing;
> +
>         termcount get_length() const;
>         TermIterator get_terms_begin() const;
>         TermIterator get_terms_end() const;

New description:

 The obvious patch for this (below) doesn't work - in Python, you get a
 property
 of xapian.Query() added, which means that you have to instantiate
 xapian.Query
 to get at !MatchNothing (ie, {{{xapian.Query().MatchNothing}}} works, but
 {{{xapian.Query.MatchNothing}}} doesn't).  It should be easy enough to fix
 this with a
 python specific workaround though.

 PHP also doesn't work; I can't seem to access the resulting function at
 all, but
 this may be more due to my lack of PHP knowledge.

 I've not tested for other languages yet.

 {{{
 Index: xapian.i
 ===================================================================
 --- xapian.i    (revision 8676)
 +++ xapian.i    (working copy)
 @@ -871,6 +871,9 @@

         ~Query();

 +       static Xapian::Query MatchAll;
 +       static Xapian::Query MatchNothing;
 +
         termcount get_length() const;
         TermIterator get_terms_begin() const;
         TermIterator get_terms_end() const;
 }}}

--

Comment:

 This wouldn't be an incompatible change, so bumping to 1.1.1.

-- 
Ticket URL: <http://trac.xapian.org/ticket/158#comment:7>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list