Hey Derek,
I´m sorry for the long response time. My EventBaseCode is a String.
Here is the query which causes the empty results:
/**
* find events which are from type "empathic comment" (eventbasecode 018)
* which took place during christmas (1979-2014).
*/
private static Iterator<SimpleFeature> getResultsForQuery7(
VectorDataStore dataStore,
AccumuloAdapterStore adapterStore ) {
Iterator<SimpleFeature> results = null;
ArrayList<TemporalRange> christmasTemporalRangeList = new ArrayList<TemporalRange>();
DateFormat df = new SimpleDateFormat(
"yyyy-MM-dd");
int year = 1979;
do {
try {
Date start = df.parse(year + "-12-24");
Date end = df.parse(year + "-12-26");
TemporalRange temporalRange = new TemporalRange(
start,
end);
christmasTemporalRangeList.add(temporalRange);
year++;
}
catch (java.text.ParseException e) {
e.printStackTrace();
}
}
while (year < 2015);
TemporalConstraints tempConstraints = new TemporalConstraints(
christmasTemporalRangeList,
"christmas");
Filter eventFilter = null;
try {
eventFilter = CQL.toFilter("EventBaseCode = '018'");
}
catch (CQLException e) {
e.printStackTrace();
}
FeatureDataAdapter adapter = (FeatureDataAdapter) adapterStore.getAdapter(new ByteArrayId(
"geowave-gdelt"));
TemporalQuery query = new TemporalQuery(
tempConstraints);
results = dataStore.query(
adapter,
INDEX,
query,
eventFilter,
Integer.MAX_VALUE);
return results;
}
Do you see any problems in there? Another question: In some methods I can define queryOptions for getting only a subset of the attributes. What do I have to do when using
dataStore.query(adapter, INDEX, query, eventFilter, Integer.MAX_VALUE)? There is no queryOption parameter. Is it possible to express it via ECQL (similar to a select-statement in SQL)?
Best regards,
Marcel Jacob.
Am 29.10.2015 15:26, schrieb Derek Yeager:
Hi Marcel,
I would like to help you debug this issue. Is the property "EventBaseCode" of type String or Integer? You may find it easier to define your filter using the static CQL.toFilter() method. For example:
- CQL.toFilter("EventBaseCode = 18") --> if EventBaseCode is an Integer
- CQL.toFilter("EventBaseCode = '018'") --> if EventBaseCode is a String
The two query methods you are using are defined in different data store implementations (VectorDataStore vs. AccumuloDataStore) and follow different query paths under the covers in GeoWave. I want to replicate the issue you are seeing so that I can properly
debug it, but in order to do so I prefer to make as few assumptions as possible. Would you mind sharing more code, the entire class if possible?
Thanks,
Derek
_______________________________________________
geowave-dev mailing list
geowave-dev@xxxxxxxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.locationtech.org/mailman/listinfo/geowave-dev
|