dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Improve Facets functions. (not supported in preprocessFilter)

Open MichelDiz opened this issue 5 years ago • 2 comments

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.

MichelDiz avatar Jan 14 '19 20:01 MichelDiz

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

manojlds avatar Jan 02 '20 19:01 manojlds

Github issues have been deprecated. This issue has been moved to discuss. You can follow the conversation there and also subscribe to updates by changing your notification preferences.

drawing

minhaj-shakeel avatar Jul 16 '20 13:07 minhaj-shakeel

Right now* @manojlds if you run mobile @facets(test) is equivalent to has(test). If it returns something it means ~True.

MichelDiz avatar Jan 09 '23 18:01 MichelDiz