//EOQualifier q3 = new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorLessThan, Long.valueOf(82));
EOQualifier q3 = new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorLessThanOrEqualTo, Long.valueOf(802));
EOQualifier qualifier = new EOAndQualifier(new NSArray<EOQualifier>(new EOQualifier[]{q1, q2, q3}));
EOFetchSpecification fs = new EOFetchSpecification("LuceneAsset", qualifier, null);
fs.setFetchLimit(5);
fs.setSortOrderings(new NSArray(new EOSortOrdering("userCount", EOSortOrdering.CompareAscending)));
Query query = ERLuceneAdaptorChannel.queryForQualifier(new EOKeyValueQualifier("userCount", EOQualifier.QualifierOperatorLessThanOrEqualTo, 802), EOUtilities.entityNamed(ec, "LuceneAsset"));
fs.setHints(new NSDictionary(query, ERLuceneAdaptor.QUERY_HINTS));
NSArray<EOEnterpriseObject> result = ec.objectsWithFetchSpecification(fs);
log.info(result.count() + ": " + result.valueForKey("userCount"));
for (EOEnterpriseObject eo : result) {