improve performance for booleanSearchEngine