lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Magnusson <magnuss...@gmail.com>
Subject Concatenating streams in streaming expressions
Date Wed, 22 Mar 2017 20:12:22 GMT
Hello;

Does anyone know of a way where I can concatenate source streams?

For example if I have two searches
search(prod,q="content:cat",fl="id,score",sort="score desc")
search(prod,q="content:dog",fl="id,score",sort="score desc")


Is there a way to have these come out as one stream. I've been trying
to use the executor function by storing these searches as expr_s.  I
however, can't figure out how to merge the output of these back into
one stream.  If I run the following code,

executor(search(queries, q="*:*",fl="id, expr_s", sort="id asc",
qt="/export")). It gives this output:

{
  "result-set": {
    "docs": [
      {
        "EOF": true,
        "RESPONSE_TIME": 32
      }
    ]
  }
}

So not the underlying tuples returned.

I want it the return to be like this for all individual searches
combined into one stream.

{
  "result-set": {
    "docs": [
      {
        "score": 12.340755,
        "id": "9a49d7d6f5b3cc597f8e55e66bb6d96438b670d1"
      },
      {
        "score": 11.879734,
        "id": "887d349fc9390a87ac7fd4209af59af61531ad06"
      },
      {
        "score": 11.82577,
        "id": "c91971049ab95cb32dc2d0f8d616aad25ee04bb7"
      },...




 I know the searches are working correctly using the executor function
because I can have them save output back to solr if I also include the
update and commit functions in the expr_s field in my source queries
collection.  Thanks

Matt

Mime
View raw message