Problem with mixed index query : All property & hasId

Hello, i have a problem during a query using mixed index in order to call ElasticSearch "all" property. Everything works fine when i only use "has(label, key, value)" alone: index is called, but when i used "has(label, key, value).hasId(within(ids))" GraphCentricQuery is correctly built but it doesn't retrieve my vertex. Any idea why this doesn't work ? (I use or step in order to use JanusGraphStepStrategy to fold has container) thanks you for your help
No description
No description
No description
16 Replies
Bo
Bo17mo ago
Might be a bug. Does it make a difference when you use hasId(125685776) instead of hasId(P.within(ids))?
Florian Hockmann
Florian Hockmann17mo ago
Another thing to check: Does ids contain long values or int?
paull8147
paull8147OP17mo ago
ids contains long, i retrieve them from a first query i will try tomorrow, day off in my country
paull8147
paull8147OP17mo ago
Hello, same result : not found. But, if i search with the correct property key instead of property "all", i find my vertex
No description
No description
Bo
Bo17mo ago
So you have a prop "xxx" and also a prop "all" that is I guess a combination of all other properties? This may not be related, but I don't quite understand why you need an Or step
paull8147
paull8147OP17mo ago
here is my ElasticSearch index with many properties, they are all duplicated in this "all" property (only in ES, i.e. I created an "all" property key for my vertex label in the schema in order to query on this property, but my vertex has no value under this property if I don't call index)
No description
No description
paull8147
paull8147OP17mo ago
i have an index for each concept, and i query different concepts in a single query, OrStep call each index correctly. In my example, i only call a single concept & index, but FilterStep doesn't call my index.
No description
No description
Bo
Bo17mo ago
I see. What you observed indeed seems quite weird. It sounds like the mixed index was not being used, so querying "all" returns nothing, but the profile screenshot clearly showed mixed index was used...
paull8147
paull8147OP17mo ago
yet I am not getting the message "Query requires iterating over all vertices [()]. For better performance, use indexes"
Bo
Bo17mo ago
You could probably check ES query logs
paull8147
paull8147OP16mo ago
Hello, sorry very busy before a delivery Here is my ES log when I run the query, ES found 2 hits. I found 2 results when i didn't add "hasId" to my query and 0 else
No description
paull8147
paull8147OP16mo ago
I also implemented a sub graph strategy in order to perform soft delete, but search on property "all" didn't working with this strategy filtering every vertex & edge (without hasId filter)
paull8147
paull8147OP16mo ago
my vertex is filtered here in JG
No description
paull8147
paull8147OP16mo ago
if i add a property "all" with my value, I retrieve my vertex
Bo
Bo16mo ago
Tbh I am lost here. I am not sure if it's a user error or an actual bug - would you be able to reproduce it in a minimal setup (e.g. test setup)?
paull8147
paull8147OP16mo ago
Yes, I will do this. I tried different things and to summarize because documentation is not clear, to enable "all" property on ES no need to add a property "all" to the vertexLabel as propertyKey, add "all" to mixed index is enough. When i make a query upon ES in all vertex fields without other constraint, my vertices are retrieve correctly, but if i make a query with another constraint like hasId or has(status, neq(deleted)), vertices are retrievec correctly by ES, but they're filtered in CloseableIteratorUtils when checking for condition matching
Want results from more Discord servers?
Add your server