if (north != null) {
Term southTerm = new Term(attrMap.getProperty(
GeoProfile.Attribute.SOUTHBC), north);
//the southbc field must be less than the north passed in.
retQuery.add(new RangeQuery(null, southTerm, true), true, false);
}
if (south != null) {
Term northTerm = new Term(attrMap.getProperty(
GeoProfile.Attribute.NORTHBC), south);
//the northbc field must be greater than the southbc passed in.
retQuery.add(new RangeQuery(northTerm, null, true), true, false);
}
if (east != null) {
Term westTerm = new Term(attrMap.getProperty(
GeoProfile.Attribute.WESTBC), east);
//the westbc field must be less than the east passed in.
retQuery.add(new RangeQuery(null, westTerm, true), true, false);
}
if (west != null) {
Term eastTerm = new Term(attrMap.getProperty(
GeoProfile.Attribute.EASTBC), west);
//the eastbc field must be greater than the westbc passed in.
retQuery.add(new RangeQuery(eastTerm, null, true), true, false);
}
return retQuery;
}