Closed aaj3f closed 7 months ago
@aaj3f I have been unable to reproduce either of these bugs on the latest main HEAD of db (currently 5d4acbd64c1af6c6032619f9b527b5bcf67c7bd0
).
@cap10morgan -- huh... we fixed it! Yes sorry when I was using main HEAD of server
(with whatever dep on db
it had), this was buggy, but updating the db
dep to db
's main HEAD fixed it!
Sorry to send you on a goose chase!
@aaj3f All good! I love it when we already fixed a bug! :)
Description
When an IRI like
ex:Yeti
orex:freddy
orex:name
is used in a query, butex
is not a term defined in thecontext
, Fluree currently fails to treat the value as an "already expanded" value in query execution.For example, if I add data like
{ "@id": "ex:andrew", "ex:name": "Andrew" }
but I don't have a term defined forex
in mycontext
, Fluree just commits this as an unexpanded value (e.g.ex:andrew
instead of, obviously,http://example.org/andrew
). That's all fine and correct.BUT, if I then go to query for that (e.g. where:
{ "@id": "?s", "ex:name": "?name" }
), and if I have any@context
for Fluree to use to do a failing lookup ofex
, then I get[]
results. The only way I can query it is if I explicitly set@context: null
in the query.Likely what is happening is that Fluree's query processing says "oh... they used a term
ex
, let me try to expand that... oh wait I can't..." but then instead of trying to useex:name
as a literal value for an IRI, it just seems to not do a lookup on it at allTLDR if any entity or property is identified as simply
ex:andrew
orfoobar:andrew
, where thatex
isn't used as a context-defined term, then queries that use those IRIs as is for their lookupsNote: there is a possibly related bug item that I'm going to include here. If I add an entity with a very simple
@id
value (e.g."@id": "freddy"
), then I am unable to issue this query withselect
and notwhere
:Whereas, if I add the entity as
"@id": "http://example.org/freddy"
, then I am able to do