-
Case normalization in the membrane tool
last modified December 19, 2009 by egj
Symptoms
A user whose username has at least one capital letter cannot be found when searching for members on /manage-team
This bug may affect all versions of OpenCore.
See also:
https://projects.openplans.org/opencore/ticket/2891
Cause
The search is executed using the membrane_tool catalog's RosterSearchableText index, using the lowercased form of the query. The membrane_tool's RosterSearchableText therefore must be indexing the lowercased form of the usernames.
To confirm that this bug affects you:
- Visit /membrane_tool/Indexes/RosterSearchableText/lexicon/manage_main in the ZMI as an admin
- If CaseNormalizer is listed in "Pipeline stages" this bug does not affect you.
Solution
You will need to remove the existing lexicon, create a new one in its place, and then clear and rebuild the membrane_tool indexes.
- Visit /membrane_tool/manage_main in the ZMI as an admin
- Click the checkbox next to the existing lexicon called "lexicon" and click the "delete" button
- In the dropdown "add" menu on the right-hand side, select "ZCTextIndex Lexicon" and click "Add"
- Give the lexicon id "lexicon" and the following options, and click "Add":
- Case normalizer: "Case normalizer"
- Stop words: "Don't remove stop words"
- Word splitter: "Whitespace splitter"
- Visit /membrane_tool/manage_catalogIndexes in the ZMI
- Scroll to the bottom of the page, click "Select all" and then click "Clear."
- When the page reloads, scroll to the bottom of the page, click "Select all" and then click "Reindex" -- this will take some time (proportional to the number of members on your site)
The bug should now be fixed.