There is a test case working that is basically the same construct that you
are having issues with. So, I think the next step is to try and reproduce
the problem that you are seeing in a test case.

If you have a small sample test dataset I can use to reproduce the error
please create a jira ticket and I will work on the issue.

Joel Bernstein
http://joelsolr.blogspot.com/

On Sun, Jun 17, 2018 at 2:40 PM, Dariusz Wojtas <dwoj...@gmail.com> wrote:

> Hi,
> I am trying to use streaming expressions with SOLR 7.3.1.
> I have successfully used innerJoin, leftOuterJoin and several other
> functions but failed to achieve expected results with the fetch() function.
>
> Example below is silmplfied, in reality the base search() function uses
> fuzzy matching and scoring. And works perfectly.
> But I need to enrich the search results with additional column from the
> same collection.
> search() call does a query on nested documents, and returns parentId (yes,
> i know there is _root_, tried it as well) + some calculated custom values,
> requiring some aggregation calls, like rollup(). This part works perfectly.
> But then I want to enrich the resultset with attributes from the top level
> document, where "parentId=id".
> And all my attempts to fetch additional data have failed, the fetch() call
> below always gives the same results as the search() call inside.
>
> fetch(users,
>       search(users, q="*:*", fq="type:name", fl="parentId", sort="parentId
> asc"),
>       fl="id,name",
>       on="parentId=id")
>
> As I understand fetch() should retrieve only records narrowed by the
> "parentId" results.
> If I call leftOuterJoin(), then I loose the benefit of such nice narrowing
> call.
> Any clue what i am doing wrong with fetch()?
>
> Best regards,
> Darek
>

Reply via email to