refactor glossary filter js
Preserve the uid on import