Add query_specobj and query_photoobj
Add tests for query_specobj and query_photoobj