[Xapian-tickets] [Xapian] #448: Allow usage of custom stemmers

Xapian nobody at xapian.org
Sun May 16 12:16:10 BST 2010


#448: Allow usage of custom stemmers
-------------------------+--------------------------------------------------
 Reporter:  esizikov     |        Owner:  olly    
     Type:  enhancement  |       Status:  reopened
 Priority:  normal       |    Milestone:  1.2.1   
Component:  Library API  |      Version:  1.0.17  
 Severity:  normal       |   Resolution:          
 Keywords:               |    Blockedby:          
 Platform:  All          |     Blocking:          
-------------------------+--------------------------------------------------

Comment(by olly):

 OK, I was right in comment:26 - adding a call to the Python code to disown
 the object fixes the error on exit:

 {{{
 #!python
 stem_impl.this.disown()
 }}}

 I've now got this working automatically using a DISOWN typemap, except
 that SWIG doesn't seem to currently support that for C# or Java.  But we
 can just not wrap !StemImplementation for these languages for now.

 Issue 1 is OK - elsewhere in the API we return std::string in similar
 cases for the same reason.  I've made the return value std::string
 (removing the const) which is consistent with what we do elsewhere.  It
 would probably be slightly better to return a const object here (I've seen
 that recommended somewhere, since being able to modify the temporary
 object isn't useful), but I think consistency is more important, and if we
 change this everywhere, we'll break compatibility with existing user
 subclasses in the other cases.

 Issue 3 is just a matter of copying the solution used elsewhere.

 And I really should check the formalities - have you read the "Licensing
 of patches" section in HACKING?  Is that all OK?

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



More information about the Xapian-tickets mailing list