Improve Facets functions. (not supported in preprocessFilter)

Moved from GitHub dgraph/2896

Posted by MichelDiz:

What you wanted to do

I tried beef up the queries for facets to add in the documentation. Especially for fulltext.
https://docs.dgraph.io/query-language/#filtering-on-facets

What you actually did

Tested alloftext, anyoftext, regexp, ie, has, allofterms, anyofterms, le, lt, ge, gt, eq, AND, OR and NOT
one by one and got the following results.

alloftext => : Fn alloftext not supported in preprocessFilter.
anyoftext => : Fn anyoftext not supported in preprocessFilter.
regexp => : One argument expected in regexp, but got 2.
has => : One argument expected in has, but got 0. (added this test just in case)

what works:
allofterms, anyofterms, le, lt, ge, gt, eq, AND, OR and NOT

Some of the functions are still been discussed if are valid or not for supporting.

1 Like

manojlds commented :

Would like to have support for has(facet1) to check if a facet exists.

Hi there. Really actual problem for us.
We need regexp to be worked on facets.

1 Like

@LGalatin - how do we prioritize this