Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastic Search for Cardinality List with meta-properties #4221

Open
cmilowka opened this issue Jan 22, 2024 · 2 comments
Open

Elastic Search for Cardinality List with meta-properties #4221

cmilowka opened this issue Jan 22, 2024 · 2 comments

Comments

@cmilowka
Copy link

Elastic Search for Cardinality List with meta-properties:
The idea is to have Elastic Search index on the vertex property declared (optional) with schema Cardinality.LIST
and having these values on that list indexed also by their corresponding meta-data (optional).

Meta-data:
Meta-data is often used to retrieve only a "slice" of the data, but that is not well supported by the indexes, as all variations are returned, and that requires additional filtering. In case of our production that means a lot of processing in our temporal system.
Example:

g.V(1234).properties('name').valueMap()
==>[date:2014,creator:stephen]
==>[date:2015,creator:oleksandr]

we need to search only for string of "name" that were created in 2015, with Gremlin examples:
like:
g.V().hasLabel("My_VERTEX").has("name","abcabc").where(__.properties("name").has("date", P.gte, 2015).has("creator", P.eq, "oleksandr" ))
or like:
g.V().hasLabel("My_VERTEX").has("name","abcabc").has("name.date", P.gte, 2015).has("name.creator", P.eq, "oleksandr" )

by something like (semi-code):
declareElasticsIndex( "MY_VERTEX_BY_NAME", JanusGraphVertex.class, "MY_VERTEX", "name", "name.date", "name.creator" ) )

See also:
stackoverflow
lfaidata

@pm-osc
Copy link
Contributor

pm-osc commented Feb 14, 2024

We also have the same use case. In our graph, data is changing over time (e.g. person changes last name) and we store this time dimension by utilizing list properties. The startTime and endTime meta-property of the list items declare from which date till which date the value was the actual one.

Any help or advice how to achieve indexing on such meta-properties would be appreciated. Thank you.

@cmilowka
Copy link
Author

I guess we all have been "inspired by the "Gremlin’s Time Machine" article from Marko A. Rodriguez (https://www.datastax.com/blog/gremlins-time-machine" ;-)
and now facing slower "slicing data by time" procedure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants