lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ganesh Sethuraman <ganeshmail...@gmail.com>
Subject Re: Solr streaming expression - options for Full Outer Join
Date Tue, 13 Feb 2018 18:42:17 GMT
one typo in the above streaming expression sort, it is "id asc" in the
collection col1

On Tue, Feb 13, 2018 at 1:38 PM, Ganesh Sethuraman <ganeshmailbox@gmail.com>
wrote:

>
> I would to perform full outer join  (emit documents from both left and
> right and if there are common combine them) with solr streaming decorators
> on two collections and "update" it to a new destination collection. I see
> merge decorator option exists, but this seems to return two JSON document
> for same id field from these two collections instead of one combined
> document. The leftOuterJoin seems to do this combining correctly by
> returning a document with matched "id" field into one document. But
> leftOuterJoin is not exactly what i want to do, i want to full outer join.
> Because merge returns two documents with same id, in the destination
> collection, only second document exists, not both. Is there a way to
> achieve what i am trying to do? Any help appreciated. Just to give more
> details, here is something I am doing:
>
> commit(
>     destinationCollection ,
>     batchSize=1,
>    update(destinationCollection,
>         batchSize=2,
>         merge(search(col1,q=id:5,fl="id, collection1_field1 ", sort="duns
> asc",qt="/export"),search(col2,q=id:5,fl="id, collection2_field2 ",
> sort="id asc",qt="/export"),on="id asc")
> ))
>
>
> Merge Response
> {
> "result-set": { "docs": [ { "id": "5", "collection1_field1": 64 }, {
> "duns": "5", "collection2_field2": 0 }, { "EOF": true, "RESPONSE_TIME": 17
> } ] } }
>
> But i need just one document in the response with combined fields
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message