slight refactoring of the Glossary search to avoid duplicating code