(issue): destination and source clauses are not joined according to query specification
Issue
Because source destination clauses are searched in a separate sql instance for performance reasons, the specified search query doesn't match results.
More specifically, currently the results of source and destination clauses are joined with an and to search query.
Proposed solution
What we can do is have a place holder for source destination clause results, which are ids, within the search query.
- for example:
if the query is (titles:title1 or destination:id1), the results of destination:id1 are first found and embedded to the transformed version of the query.
The place holder can be placed within :transform clause.
Then have a function that embeds source and destination clause search results within the transformed entity.
the place holder needs to be unique and easy to find from source/destination clause.
I propose the place holder is the same as the source clause. then can easily find with find function and replace with the results of source destination clause.