update query advanced

update query advanced to make multiple requests if necessary to get all
unique field values
Merge pull request #5 from btfou/master

update query advanced