Chunk queries so lucene boolean conditional limit is never exceeded. Issue: medic/medic-webapp#657