Refine code to filter fulltext