ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colinc <colinmcass...@yahoo.co.uk>
Subject Meaning of multiple index types
Date Thu, 09 Jun 2016 07:54:52 GMT
When configuring a cache for use with SqlFieldsQuery, it is necessary to call
setIndexedTypes(). The below example from the documentation defines 3 types
to index:

ccfg.setIndexedTypes(
  MyKey.class, MyValue.class,
  Long.class, MyOtherValue.class,
  UUID.class, String.class
);

If an individual cache can only be used to store objects of one type e.g.
MyValue, then what is the meaning of specifying 3 pairs of types in this
case? It seems possible to write a query for any of the indexed types but it
is only possible to put one type of object in the cache - so querying the
other types returns nothing.

I'm interested in this in case it allows me to index and query across a
graph of objects. For example if the MyValue class has a collection of
MyOtherValue objects, then would it be possible to index and query both
objects in the same cache? Or is it only ever possible to query main cache
type?

Thanks,
Colin.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Meaning-of-multiple-index-types-tp5545.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message