[Xapian-tickets] [Xapian] #178: No remote backend support for: spelling correction, synonyms, matchdecider

Xapian nobody at xapian.org
Mon Nov 30 13:32:24 GMT 2009


#178: No remote backend support for: spelling correction, synonyms, matchdecider
----------------------------+-----------------------------------------------
 Reporter:  richard         |        Owner:  richard  
     Type:  defect          |       Status:  assigned 
 Priority:  normal          |    Milestone:  1.2.x    
Component:  Backend-Remote  |      Version:  SVN trunk
 Severity:  normal          |   Resolution:           
 Keywords:                  |    Blockedby:           
 Platform:  All             |     Blocking:           
----------------------------+-----------------------------------------------

Comment(by olly):

 It would be much more helpful to have a patch with just the new changes,
 not one which also includes those I've already applied to trunk.

 As I said on IRC, I think {{{Database::get_spelling_suggestion()}}} with
 remote databases should cause a remote search for the best spelling
 suggestion and just pass that back.  Only the local databases should take
 part in the {{{OrTermList}}}.  You can easily calculate the edit distance
 for the remote spelling suggestion(s), and compare it/them to that of the
 best local one to find the best overall answer.

 I don't think opening the spelling termlists and streaming them over is
 the right approach.  It involves sending a lot of data, and if we have to
 read each as a single lump, will be rather slow too.  Arrange to stream
 them is possible, but fiddly, and the effort is misdirected I feel.

 So {{{RemoteDatabase::open_spelling_termlist()}}} should never get called
 and can simply remain unimplemented.

 And {{{RemoteDatabase::open_spelling_wordlist()}}} can be implemented
 using the public API
 (via {{{Xapian::Database::spellings_begin()}}} and
 {{{Xapian::Database::spellings_end()}}}).

 Also, you're not being zero-byte safe (again) - in
 RemoteServer::msg_getspellingsuggestion(const string & message):

 {{{
 #!cpp
     string word = string(p);
 }}}

 should be:

 {{{
 #!cpp
     string word(p, p_end - p);
 }}}

 Otherwise word will be truncated at the first zero byte it contains (not a
 very likely occurrence, but it is easy to get right.

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



More information about the Xapian-tickets mailing list