Modify thread search

- Add logic search into thread