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

Mixed Indexes not getting used for Partial/regex match queries #350

Open
pushkarnagpal opened this issue Jun 9, 2020 · 0 comments
Open

Comments

@pushkarnagpal
Copy link

pushkarnagpal commented Jun 9, 2020

@dwitry
Storage: Janusgraph with HBase as backend (0.4.x)
Gremlin Tinkerpop version : 4.3.4
cypher-for-gremlin version: 1.0.1

I want to utilize the mixed indexes for performance of the following scenarios :

1. For the partial match ( =~ ) queries:

match (p:party) where p.partyType =~ 'organization' return p limit 1

Screenshot 2020-06-05 at 7 18 07 PM

The query does work but I want to verify if this translates to a gremlin query that utilizes an index for large datasets. But the function cypherRegex() function errors out in translation.

Translating to textContains() would make use of the mixed indexes here

Screenshot 2020-06-05 at 7 21 40 PM

2. Queries using the CONTAINS clause

This clause translates to containing() function which does not utilize any indexes as mentioned in this documentation here:
https://docs.janusgraph.org/v0.4/index-backend/text-search/#tinkerpop-text-predicates
Same for STARTS WITH and ENDS WITH clauses.

Translating to textContains() instead would make use of mixed indexes to improve query performance here.

Reference Issue:
#294

@pushkarnagpal pushkarnagpal changed the title Translation for regex match queries to cypherRegex() containing gremlin query goves an error Mixed Indexes not getting used for Partial match queries Jun 10, 2020
@pushkarnagpal pushkarnagpal changed the title Mixed Indexes not getting used for Partial match queries Mixed Indexes not getting used for Partial/regex match queries Jun 10, 2020
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

1 participant