lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susheel Kumar <susheel2...@gmail.com>
Subject Re: Complement Stream function - Invalid ReducerStream - substream comparator (sort) must be a superset of this stream's comparator
Date Wed, 21 Jun 2017 19:20:59 GMT
While simple complement works in this way

===
complement(merge(sort(select(echo("A"),echo as email),by="email asc"),
sort(select(echo("B"),echo as email),by="email asc"),
on="email asc"),
merge(sort(select(echo("A"),echo as email),by="email asc"),
sort(select(echo("D"),echo as email),by="email asc"),on="email asc"),
on="email")

BUT below it doesn't work when used in similar way

===
let(a=fetch(collection1,having(rollup(over=email,
                 count(email),
                select(search(collection1,
                        q=*:*,
                        fl="id,business_email",
                        sort="business_email asc"),
   id,
   business_email as email)),
    eq(count(email),1)),
fl="id,business_email as email",
on="email=business_email"),
b=fetch(collection1,having(rollup(over=email,
                 count(email),
                select(search(collection1,
                        q=*:*,
                        fl="id,personal_email",
                        sort="personal_email asc"),
   id,
   personal_email as email)),
    eq(count(email),1)),
fl="id,personal_email as email",
on="email=personal_email"),
c=hashJoin(get(a),hashed=get(b),on="email"),
d=hashJoin(get(b),hashed=get(a),on="email"),
e=select(get(c),id,email),
f=select(get(d),id,email),
g=sort(get(e),by="id asc,email asc"),
h=sort(get(f),by="id asc,email asc"),
i=complement(get(g),get(h),on="id,email"),
get(i)
)


On Wed, Jun 21, 2017 at 11:29 AM, Susheel Kumar <susheel2777@gmail.com>
wrote:

> Hi,
>
> Two issues with complement function (solr 6.6)
>
> 1)  When i execute below streaming expression,
>
> ==
>
> let(a=fetch(collection1,having(rollup(over=email,
>                  count(email),
>                 select(search(collection1,
>                         q=*:*,
>                         fl="id,business_email",
>                         sort="business_email asc"),
>    id,
>    business_email as email)),
>     eq(count(email),1)),
> fl="id,business_email as email",
> on="email=business_email"),
> b=fetch(collection1,having(rollup(over=email,
>                  count(email),
>                 select(search(collection1,
>                         q=*:*,
>                         fl="id,personal_email",
>                         sort="personal_email asc"),
>    id,
>    personal_email as email)),
>     eq(count(email),1)),
> fl="id,personal_email as email",
> on="email=personal_email"),
> c=hashJoin(get(a),hashed=get(b),on="email"),
> d=hashJoin(get(b),hashed=get(a),on="email"),
> e=select(get(c),id,email),
> f=select(get(d),id,email),
> g=sort(get(e),by="id asc,email asc"),
> h=sort(get(f),by="id asc,email asc"),
> i=complement(get(g),get(h),on="id,email"),
> get(i)
> )
>
>
> getting response as
>
> { "result-set": { "docs": [ { "EXCEPTION": "Invalid ReducerStream -
> substream comparator (sort) must be a superset of this stream's
> comparator.", "EOF": true } ] } }
>
> 2) when i execute below
>
>
> complement(
>   select(search(collection1, q=*:*, fl="id,business_email", sort="id asc, business_email
asc"),id,business_email as email),
>   select(search(collection1, q=*:*, fl="id,personal_email", sort="id asc, personal_email
asc"),id,personal_email as email),
>   on="id,email"
> )
>
> getting response as
>
> {
>   "result-set": {
>     "docs": [
>       {
>         "EXCEPTION": "Invalid expression complement(  select(search(collection1, q=*:*,
fl=\"id,business_email\", sort=\"id asc, business_email asc\"),id,business_email as email),
 select(search(collection1, q=*:*, fl=\"id,personal_email\", sort=\"id asc, personal_email
asc\"),id,personal_email as email),  on=\"id,email\") - unknown operands found",
>         "EOF": true
>       }
>     ]
>   }
> }
>
>

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