JanusGraph / JanusGraph/janusgraph

Elastic Search for Cardinality List with meta-properties

Open
#4,221 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

**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](https://stackoverflow.com/questions/77554095/elastic-search-for-cardinality-list-values-with-meta-properties)
[lfaidata](https://lists.lfaidata.foundation/g/janusgraph-users/topic/elastic_search_for/102740533?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,102740533,previd%3D1701139989072515465,nextid%3D1678949322548163590&previd=1701139989072515465&nextid=1678949322548163590)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the proposed Gremlin queries, the semi-code declareElasticsIndex example, and the linked Stack Overflow and mailing-list discussions. Define the required behavior for LIST cardinality and optional meta-properties, then verify that indexed queries return only values matching the requested date and creator.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, java
Domain
databases, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.