From 111dd7a7e5fe8ca16f29d12d4563e35dfd0df877 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Sat, 13 Feb 2016 12:22:14 +0100 Subject: [PATCH] Actually make use of the autodiacsens and autocasesens configuration variables. Closes issue #299 --- src/Makefile.am | 2 +- src/doc/user/usermanual.xml | 16 +++++++++------- src/rcldb/searchdatatox.cpp | 2 ++ website/BUGS.html | 4 ++++ 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index a3d7c577..e32b4e66 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -625,7 +625,7 @@ doc/user/usermanual.html: doc/user/usermanual.xml mkdir -p doc/user test -f doc/user/Makefile || \ cp -p $(top_srcdir)/doc/user/Makefile doc/user - $(MAKE) -C doc/user VPATH=../../$(VPATH)/doc/user usermanual.html + $(MAKE) -C doc/user VPATH=$(VPATH):$(VPATH)/doc/user usermanual.html endif dist_man1_MANS = doc/man/recoll.1 doc/man/recollq.1 doc/man/recollindex.1 diff --git a/src/doc/user/usermanual.xml b/src/doc/user/usermanual.xml index aa52a186..1801607f 100644 --- a/src/doc/user/usermanual.xml +++ b/src/doc/user/usermanual.xml @@ -3484,17 +3484,19 @@ dir:recoll dir:src -dir:utils -dir:common For &RCL; versions 1.18 and later, and when working with a raw index (not the default), searches can be - made sensitive - to character case and diacritics. How this happens is controlled by - configuration variables and what search data is entered. + sensitive to character case and diacritics. How this happens + is controlled by configuration variables and what search data is + entered. - The general default is that searches are insensitive to case - and diacritics. An entry of resume will match any - of Resume, RESUME, + The general default is that searches entered without upper-case + or accented characters are insensitive to case and diacritics. An + entry of resume will match any of + Resume, RESUME, résumé, Résumé etc. Two configuration variables can automate switching on - sensitivity: + sensitivity (they were documented but actually did nothing until + &RCL; 1.22): diff --git a/src/rcldb/searchdatatox.cpp b/src/rcldb/searchdatatox.cpp index 6dfcbceb..ffc3fc1c 100644 --- a/src/rcldb/searchdatatox.cpp +++ b/src/rcldb/searchdatatox.cpp @@ -168,6 +168,8 @@ bool SearchData::toNativeQuery(Rcl::Db &db, void *d) db.getConf()->getConfParam("maxTermExpand", &m_maxexp); db.getConf()->getConfParam("maxXapianClauses", &m_maxcl); + db.getConf()->getConfParam("autocasesens", &m_autocasesens); + db.getConf()->getConfParam("autodiacsens", &m_autodiacsens); // Walk the clause list translating each in turn and building the // Xapian query tree diff --git a/website/BUGS.html b/website/BUGS.html index 9c6ad30d..f77de6b9 100644 --- a/website/BUGS.html +++ b/website/BUGS.html @@ -66,6 +66,10 @@ versions.

problem.
+
  • For indexes with case and diacritics sensitivity (not the + default), the autocasesens and autodiacsens configuration variable do + not work as described in the manual (they have no effect).
  • +
  • The GUI must be restarted after changing the path translation values (ptrans), even when they are changed from the GUI preferences.