Ticket #158 (assigned defect)

Opened 18 months ago

Last modified 7 months ago

Query::MatchNothing and Query::MatchAll aren't wrapped

Reported by: richard Owned by: olly
Priority: normal Milestone: 1.1.0
Component: Xapian-bindings Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking:

Description (last modified by richard) (diff)

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;

Change History

Changed 18 months ago by richard

  • blocking set to 120

Marking this for 1.0.x, since it ought to be fixed. It really ought to be simple to fix, but I'm not completely sure how to do so, or I'd have marked it for 1.0.1.

Changed 18 months ago by olly

  • status changed from new to assigned

Changed 18 months ago by trac

  • platform set to All

Changed 9 months ago by olly

Someone pointed out on IRC that we could wrap these by hand in the languages by making use of the Query() and Query("") forms. This certainly seems feasible for Python anyway.

Changed 7 months ago by richard

  • description modified (diff)
  • milestone set to 1.1

Changed 7 months ago by richard

  • blocking deleted

(In #120) Remove the unfixed dependencies so we can close this bug - they're all marked for the 1.1.0 milestone.

Note: See TracTickets for help on using tickets.