Hi, I thing this might give some clue. I tried to reproduce the issue with a collection called testCloud.
fetch(testCloud1, search(testCloud1, q="*:*", fq="type:name", fl="parentId", sort="parentId asc"), fl="id,name", on="parentId=id") The expression above produces 3 log entries presented below (just cut the content before 'webapp' in each line to save space): webapp=/solr path=/stream params={expr=fetch(testCloud1,%0a++++++search(testCloud1,+q%3D"*:*",+fq%3D"type:name",+fl%3D"parentId",+sort%3D"parentId+asc"),%0a++++++fl%3D"id,name",%0a++++++on%3D"parentId%3Did")&_=1529178931117} status=0 QTime=1 webapp=/solr path=/select params={q=*:*&distrib=false&fl=parentId&fq=type:name&sort=parentId+asc&wt=json&version=2.2} hits=1 status=0 QTime=1 webapp=/solr path=/select params={q={!+df%3Did+q.op%3DOR+cache%3Dfalse+}+123&distrib=false&fl=id,name,_version_&sort=_version_+desc&rows=50&wt=json&version=2.2} hits=0 status=0 QTime=1 If I use the 3rd line parameters with an url: http://10.0.75.1:8983/solr/testCloud1/select?q={!+df%3Did+q.op%3DOR+cache%3Dfalse+}+123&distrib=false&fl=id,name,_version_&sort=_version_+desc&rows=50&wt=json&version=2.2 then the resultset is empty. It searches for 'id' value fo 123. BUT if I remove the plus sign before the '123' and have url like this: http://10.0.75.1:8983/solr/testCloud1/select?q={!+df%3Did+q.op%3DOR+cache%3Dfalse+}123&distrib=false&fl=id,name,_version_&sort=_version_+desc&rows=50&wt=json&version=2.2 THEN IT RETURNS SINGLE ROW WITH EXPECTED VALUES. Maybe this gives some light? Maybe it's about the enriching query syntax? I have tried with fetch containing query that returns more identifiers. In the 3rd log entry the identifiers start with a plus sign and are separated with pluses, as in the log entry below q={!+df%3Did+q.op%3DOR+cache%3Dfalse+}+123+124&distrib=false&fl=id,name,_version_&sort=_version_+desc&rows=50&wt=json&version=2.2 No results returned, and the data is not enriched with additional attributes. Best regards, Darek On Mon, Jun 18, 2018 at 3:07 PM, Joel Bernstein <joels...@gmail.com> wrote: > 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 > > >