CaTIES_LuceneSearcher can be compiled into an executable jar to query the counts of terms in the indices
Example command
Find all male patients with adenocarcinoma
java -jar QueryLuceneIndex.jar -operator and -field1 gender -value1 "Female Gender" -field2 documentText -value2 adenocarcinoma -path /PATH/TO/PRODINDEX