fix search query sort
fix granularity origin