No worries, the value is a hashmap that store some configuration and I
just use index on the key to get the stuff out of there so should not be
a problem.
Mikael
Den 2018-01-30 kl. 10:19, skrev Stanislav Lukyanov:
To add a detail, value will have an index created for it if it is a
primitive (or an “SQL-friendly” type like Date).
I don’t think there is an easy way to avoid that. You could use a
wrapper for the primitive value, but it will also
have some overhead and it’s hard to say whether it will be more
efficient than having an index for the value.
Stan
*From: *Amir Akhmedov <mailto:amir.akhme...@gmail.com>
*Sent: *30 января 2018 г. 1:32
*To: *user@ignite.apache.org <mailto:user@ignite.apache.org>
*Subject: *Re: Index question.
Ok, then it makes sense.
You cannot pass null into setIndexedTypes(). But if you don't put any
@QuerySqlField annotation in value class or declare fields/indexes
through Java API then no columns/indexes will be created in SQL storage.
On Mon, Jan 29, 2018 at 3:59 PM, Mikael <mikael-arons...@telia.com
<mailto:mikael-arons...@telia.com>> wrote:
Thanks, the reason I need SQL is that my key is not a primitive,
it's a class made of 2 int and one String and I need to query on
parts of the key and not the entire key, like select all keys
where one of the integers is equal to 55 for example.
Mikael
Den 2018-01-29 kl. 19:05, skrev Amir Akhmedov:
Hi Mikael,
1. This is just a warning informing you that Ignite's object
serialization will differ from yours Externalizable
implementation. By default Ignite will serialize all fields in
object and if you want to customize then you need implement
Binarylizable interface or set custom serializer as stated in
warning message.
Even if you did not specify any @QuerySqlField in your object
Ignite stores the whole serialized object in SQL table under
_val field for internal usage.
The open question is why do you need SQL if you are using only
key based search? You can make exactly the same using Java
Cache API.
2. You can leave Externalizable implementation in the class,
it won't hurt.
3. Please check bullet #1, if you don't want indexes then you
don't need create them.
Thanks,
Amir
--
Sincerely Yours Amir Akhmedov