I've just realized that search expressions, when parsed, are logically "anded" to
base := &Constraint{
Permanode: &PermanodeConstraint{
SkipHidden: true,
},
}
so that they only match permanodes.
This hadn't really been a problem so far, until the introduction of the "ref:" predicate, used in particular for map queries. It is of no consequence when the predicate is used in the map apsect, because we're only interested in permanodes there.
However, I took the opportunity to replace as well the
uses in index.js with a "ref:" predicate, which means the web UI is now broken for when one wants to get the Blob aspect of a (non-permanode, e.g. file schema) blob.
The above is easy to revert, but it does open the question about whether we always want a search expression to only match permanodes. Or even if we ever want to force it to.
In addition, I'm also working (pretty much done) on a new directories/files browsing aspect, which does rely as well on non-permanode blob searches. Again, it's probably a non issue if we revert the above, and simply use constraints instead of predicates when we want non-permanodes, but still.
If we do keep the current behaviour for search expressions, we should document it.
I've just realized that search expressions, when parsed, are logically "anded" to
so that they only match permanodes.
This hadn't really been a problem so far, until the introduction of the "ref:" predicate, used in particular for map queries. It is of no consequence when the predicate is used in the map apsect, because we're only interested in permanodes there.
However, I took the opportunity to replace as well the
uses in index.js with a "ref:" predicate, which means the web UI is now broken for when one wants to get the Blob aspect of a (non-permanode, e.g. file schema) blob.
The above is easy to revert, but it does open the question about whether we always want a search expression to only match permanodes. Or even if we ever want to force it to.
In addition, I'm also working (pretty much done) on a new directories/files browsing aspect, which does rely as well on non-permanode blob searches. Again, it's probably a non issue if we revert the above, and simply use constraints instead of predicates when we want non-permanodes, but still.
If we do keep the current behaviour for search expressions, we should document it.