Thanks for your informative reply. I looked at CacheQueryExample to be able to query by both unique (k1) and non-unique (k2) keys.
I use an /AffinityKey<String, T>/. However, k1 (unique key) and k2 (non-unique key) are not member variables, where I would have been able to annotate them with /@QuerySqlField(index = true)/ (with true and false, respectively). They are entries of a map inside of T. There are getter methods for both. Having said that: 1. How do I identify the k1 to be an index key so I can execute a query with a predicate like this: "k1 = ?" I saw this post: [Q1] <http://apache-ignite-users.70518.x6.nabble.com/Querying-HashMap-stored-as-value-in-IgniteCache-td3507.html#a3550> 2. Will the same strategy work for a query based on a non-unique key (k2) in the same map within T? Andrew Mashenkov wrote > If k2 <- k1 relation is one-to-many, there is another way to achieve the > same with using SQL [2]. > With this approach adding new instance will be a single operation on one > node and Ignite will need just to update local index in addition, but > query > for k2 will be a broadcast unless the data is collocated [3]. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
