[Xapian-tickets] [Xapian] #614: PHP-Bindings & garbage collector

Xapian nobody at xapian.org
Thu Mar 7 23:36:23 GMT 2013


#614: PHP-Bindings & garbage collector
-----------------------------------+----------------------------------------
 Reporter:  Sadrak                 |       Owner:  olly  
     Type:  defect                 |      Status:  new   
 Priority:  normal                 |   Milestone:  1.3.1 
Component:  Xapian-bindings (PHP)  |     Version:  1.2.13
 Severity:  normal                 |    Keywords:        
Blockedby:                         |    Platform:  All   
 Blocking:                         |  
-----------------------------------+----------------------------------------
Changes (by olly):

  * component:  QueryParser => Xapian-bindings (PHP)
  * severity:  critical => normal
  * milestone:  => 1.3.1


Comment:

 This is actually a known issue - I thought there was already a ticket, but
 I can't find one, and it doesn't seem to be mentioned in the documentation
 for the PHP bindings.

 In order to fix it, the PHP !XapianQueryParser object needs to keep a
 reference to any VRPs which are set on it (and similarly for stemmers,
 stoppers, etc).  We already do this for Python, but it's not been
 implemented for other the languages yet.

 The workaround is to ensure you keep a reference to the PHP VRP object for
 as long as you keep the reference to the PHP !XapianQueryParser which you
 set it on.

 In your example above, inlining the body of add_processor where it is
 called should do the trick, or you can stick the PHP VRP object into a
 property of $qp:

 {{{
 #!php
     $qp->vrp = $price_range_proc;
 }}}

 We should at the very least make sure this is more clearly documented for
 the next release, so setting milestone appropriately.

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



More information about the Xapian-tickets mailing list