--- a/src/rcldb/stemdb.cpp
+++ b/src/rcldb/stemdb.cpp
@@ -57,18 +57,18 @@
}
#ifndef RCL_INDEX_STRIPCHARS
- // Expand the unaccented stem
if (!o_index_stripchars) {
string unac;
unacmaybefold(term, unac, "UTF-8", UNACOP_UNAC);
- if (term != unac) {
- for (vector<string>::const_iterator it = llangs.begin();
- it != llangs.end(); it++) {
- SynTermTransStem stemmer(*it);
- XapComputableSynFamMember expander(getdb(), synFamStemUnac,
- *it, &stemmer);
- (void)expander.synExpand(unac, result);
- }
+ // Expand the unaccented stem, using the unaccented stem
+ // db. Because it's a different db, We need to do it even if
+ // the input has no accent (unac == term)
+ for (vector<string>::const_iterator it = llangs.begin();
+ it != llangs.end(); it++) {
+ SynTermTransStem stemmer(*it);
+ XapComputableSynFamMember expander(getdb(), synFamStemUnac,
+ *it, &stemmer);
+ (void)expander.synExpand(unac, result);
}
}
#endif