Akiel, Without seeing your full url I assume that you're missing the stream=innerJoin(.....) part of it. A full sample url would look like this http://localhost:8983/solr/careers/stream?stream=innerJoin(search(careers, fl="personId,companyId,title", q=companyId:*, sort="companyId asc",zkHost="localhost:2181",qt="/export"),search(companies, fl="id,companyName", q=*:*, sort="id asc",zkHost="localhost:2181",qt="/export"),on="companyId=id")
This example will return a join of career records with the company name for all career records with a non-null companyId. And the pieces have the following meaning: http://localhost:8983/solr/careers/stream? - you have a collection called careers available on localhost:8983 and you're hitting its stream handler ?stream= - you are passing the stream parameter to the stream handler zkHost="localhost:2181" - there is a zk instance running on localhost:2181 where solr can get clusterstate information. Note, that since you're sending the request to the careers collection this param is not required in the search(careers....) part but is required in the search(companies....) part. For simplicity I usually just provide it for all. qt="/export" - tells solr to use the export handler. this assumes all your fields are in docValues. if you'd rather not use the export handler then you probably want to provide the rows=##### param to tell solr to return a large # of rows for each underlying search. Without it solr will default to, I believe, 10 rows. CCing the user list so others can see this as well. We're working on additional documentation for Streaming Aggregation and Expressions. The page can be found at https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions but it's missing a lot of things we've added recently. - Dennis On Fri, Dec 11, 2015 at 9:51 AM, Akiel Ahmed <ahmed...@uk.ibm.com> wrote: > Hi, > > Sorry, this is out of the blue - I have joined the Solr mailing list, but > I don't know if that it is the correct place to ask my question. If you are > not the best person to talk to can you please point me in the right > direction. > > I want to try using the Solr 6 distributed joins but cant find enough > material on the web to make it work. I have added the stream handler to my > solrconfig.xml (see below) and when issuing an inner join query (see below) > I get a an error - the localparm named stream is missing so I get a > NullPointerException. Is there a way to play with the join via the Solr web > UI, or if not do you have a code snippet via a SolrJ client that performs a > join? > > solrconfig.xml > > <requestHandler name="/stream" class="solr.StreamHandler"> > <lst name="invariants"> > <str name="wt">json</str> > <str name="distrib">false</str> > </lst> > </requestHandler> > > query > innerJoin( > search(getting_started, _search_field:john), > search(getting_started, _search_field:friends), > on="id=_link_from_id") > > Cheers > > Akiel > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with number > 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU >