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
16 Replies
Might be a bug. Does it make a difference when you use
hasId(125685776)
instead of hasId(P.within(ids))
?Another thing to check: Does
ids
contain long
values or int
?ids
contains long, i retrieve them from a first query
i will try tomorrow, day off in my countryHello, same result : not found.
But, if i search with the correct property key instead of property "all", i find my vertex
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
stephere 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)
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.
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...
yet I am not getting the message "Query requires iterating over all vertices [()]. For better performance, use indexes"
You could probably check ES query logs
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
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)
my vertex is filtered here in JG
if i add a property "all" with my value, I retrieve my vertex
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)?
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