You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2015/11/24 22:42:15 UTC

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



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

Re: Searching for something based on an Array values

Posted by Andrey Gura <ag...@gridgain.com>.
Kevin,

there is no such possibility. But you can create inverted index as cache
which contains list of all objects for given long value.

Another way is to represent edge as object with two long fields ("from" and
"to") and create group index for this fields.

On Wed, Nov 25, 2015 at 1:02 AM, Kevin Daly <ke...@meta.com> wrote:

> 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.
>



-- 
Andrey Gura
GridGain Systems, Inc.
www.gridgain.com

Re: Searching for something based on an Array values

Posted by vkulichenko <va...@gmail.com>.
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



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

Re: Searching for something based on an Array values

Posted by Kevin Daly <ke...@meta.com>.
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.



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

Re: Searching for something based on an Array values

Posted by Yakov Zhdanov <yz...@apache.org>.
Kevin, how long is the array? How often does it get changed?


--Yakov

2015-11-25 1:02 GMT+03:00 Kevin Daly <ke...@meta.com>:

> 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.
>

Re: Searching for something based on an Array values

Posted by Kevin Daly <ke...@meta.com>.
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.