Searching for something based on an Array values

classic Classic list List threaded Threaded
7 messages Options
Kevin Daly Kevin Daly
Reply | Threaded
Open this post in threaded view
|

Searching for something based on an Array values

This post has NOT been accepted by the mailing list yet.
Say I have an object with a String[] Stored in it.

And I have the field as Indexed..

can I do an SQL statement that will be efficient for finding values such as find me all the objects that have this value in the Array?

vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

Hi Kevin,

Can you please properly subscribe to the mailing list so that community receives email notifications. Follow the instructions here: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

Kevin Daly wrote
Say I have an object with a String[] Stored in it.

And I have the field as Indexed..

can I do an SQL statement that will be efficient for finding values such as find me all the objects that have this value in the Array?
I don't think this is supported right now. Can you clarify what kind of query you're going to execute? Are you going to search only by equality or with less than/greater than conditions as well?

-Val
Kevin Daly Kevin Daly
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

We have an object that contain an array of long[] values

What I am trying to do is to find all of the objects that contain a value in that array.. Kind of trying to simulate edges in a graph database.. We can achieve this goal via link tables and SQL

Alternatively I was thinking of indexing the objects with lucene, thus using that index, but it looks like it will only index text, not and array of long values.

Kind of trying to think our of the box.
agura-2 agura-2
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

CONTENTS DELETED
The author has deleted this message.
yakov yakov
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

In reply to this post by Kevin Daly
Kevin, how long is the array? How often does it get changed?


--Yakov

2015-11-25 1:02 GMT+03:00 Kevin Daly <[hidden email]>:
We have an object that contain an array of long[] values

What I am trying to do is to find all of the objects that contain a value in
that array.. Kind of trying to simulate edges in a graph database.. We can
achieve this goal via link tables and SQL

Alternatively I was thinking of indexing the objects with lucene, thus using
that index, but it looks like it will only index text, not and array of long
values.

Kind of trying to think our of the box.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Searching-for-something-based-on-an-Array-values-tp2047p2053.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Kevin Daly Kevin Daly
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

It could be 100's or even 1000's of objects..

Say we have Object A is related to Object B we need a way of expressing the association so that we can navigate from one to the other.

it's a many to many association type idea.. If we co-locate the association cache with the source, then we cannot navigate from the destination, or the other way around.

Does that make sense?

The strategy for now will be to create a Bi-Cache that stores and maintains the edges on both sides.
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Searching for something based on an Array values

Hi Kevin,

Yes, in case of many-to-many relationship there is no way to collocate if both entities are stored in partitioned caches. I see two possible workarounds for that:
- Put one of entities into replicated cache so that it's available on all nodes and therefore doesn't need to be collocated.
- Denormalize the data and use one-to-many relationship instead. You will have to duplicate some data, but this approach doesn't require to utilize replicated caches.

Can you please describe in more detail what you mean by 'Bi-Cache'?

-Val