The cache system is build around the methods I use to perform the faceted search!
I have a method named "getFacetedFor(parameters...)". When the parameters and the lucene index data are unchanged the system caches the results! So further calls can be resolved with no server elaboration.
That's all. I haven't found a better rapid solution.
My main beans structure is similar to:
Code:
@Indexed
@ClassBridge(name = "customClassBridge", impl = MyCustomClassBridge.class)
class MyFactBean{
@ID
UUID id;
Date from;
Date to;
@IndexedEmbedded
BeanType1: sourceItemType1;
@IndexedEmbedded
BeanType2: sourceItemType2;
@IndexedEmbedded
BeanType3: sourceItemType3;
@IndexedEmbedded
BeanType1: destinationItemType1;
@IndexedEmbedded
BeanType2: destinationItemType2;
@IndexedEmbedded
BeanType3: destinationItemType3;
... other fields are not indexed
}
class BeanTypeBase(){
@ID
UUID id,
@Field() // variable length - max length=16
String value;
}
@Cacheable
class BeanType1 extends BeanTypeBase{}
@Cacheable
class BeanType2 extends BeanTypeBase{}
@Cacheable
class BeanType3 extends BeanTypeBase{}
It's possible that linked class have null values.
I would like improve performance for "indexed embedded" fields.
ps. I tryed to create an "improvement issue" on jira, I registered myself now, but it seems I cannot create issues.