[req] fix find() generating non-rewritable rql on non final relations
When filtering on a relation, find() was generating rql like
'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it
should probably not), but when applying some rewrite (eg. permissions) it raise
in rqlrewrite code.
def _use_orig_term(self, snippet_varname, term):
...
> self.rewritten[key] = term.name
E AttributeError: 'Constant' object has no attribute 'name'
Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.
.. winclude:: search_sample_queries
You can as well type complex queries using the RQL_ query language,
used every where to build dynamic pages of this site.
You can use one of the following prefixes to specify which kind of search you
want:
* `rql` : RQL query
* `text` : full text search
.. _RQL: tut_rql