Add flexiblequery.
Merge pull request #26 from philolee/master

Add flexiblequery.