It's acceptable to have _some_ performance degradation, but there's certainly a need to be able to search on predicates that are not indexed.
If there are billions of vertices with millions of predicates, it does not seem like a good idea to index all predicates. This means that searching on those predicates is not possible. There needs to be _some_ way of searching without indexing.
There is a function for this https://docs.dgraph.io/query-language#has
I believe that this answer the question. If the question is to create Search in non-indexed predicates via functions that need to be explicitly indexed (Like "allofterms"). I think it's impossible. Because you would need to build several types of indexes at first to get this. That would take up a lot of space.
Feel free to reopen if needed.
We've found a workaround for this since the issue was initially filed. For anyone else curious about this:
{
var(func: has(pred_to_be_searched)) {
p as pred_to_be_searched
}
query(func: eq(val(p), "value-searching-for")) {
pred_to_be_searched
}
}
This is a good solution. @kdsgambhir we should document this in our docs.
Most helpful comment
We've found a workaround for this since the issue was initially filed. For anyone else curious about this: