fix filter when empty qeury string

Signed-off-by: Hiroshi Miura <miurahr@linux.com>