Refactor search by keyword js
Add support for searching by tag