Searching Terracotta caches;Attiribute extractor for IData.


Im trying to search my searchable caches which are filled with Idata objects

However,It seems that SAG has not provided any out of box extractors to extract attributes from IData

It looks like i will need to write my own classes to extract it.

Anyone else faced this or has some code I can use to extract?

What kind of IDATA object you are trying to extract example TN bizdoc or IS document from the pipe?


just a regular IData document which i loaded to the cache


As per the current stable version, there is no OOTB services to provide you the search results in String or IData format however SAG will incorporate the utilities in their near future versions and they will update the IS Java API (Server and Client) References accordingly.

I had create a utility service to get the cache search results in String and IData format, refer the below classes and code a java service class:

public class SearchResult implements Serializable {


  • Returns the key of the individual search result.
  • @return {Object} key
    public Object getKey();


  • Returns the value of the individual search result.
  • @return {Object} value

public Object getValue();


  • Returns the aggregator results.
  • @return {List} aggregator results.
    public List getAggregatorResults();


  • Returns the value of the given attribute with the individual search
  • result.
  • @param attribute
  • {String} The name of the attribute.
  • @return {Object} attribute value
    public Object getAttribute(String attribute);

Thanks for the response M@he$h …but dont we need the class to implement AttributeExtractor class?

Yes, we need them as a prerequisite. Contact SAG support or search on Empower, you will find a sample package to search cache both string and IData.

If you have questions, feel free to contact me on my email.

Hi, I can find any sample package, do you guys know where to find it?