You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Joe Andaverde <jo...@gmail.com> on 2019/10/19 20:35:09 UTC

SolrCloud streaming innerJoin unexplained results

I don't believe I am getting expected results when using a streaming
expression that simply uses innerJoin.

Here's the example:

innerJoin(
    search(illuminate, q=(mrn:123) (*:*), fl="key,mrn", sort="mrn asc"),
    search(illuminate, q=(foo*), fl="key,mrn,*", sort="mrn asc"),
    on="mrn"
)

All documents in my scenario are sharded based on the mrn field. Therefore,
only one shard will have documents that match the left query. All shards
will match the right.

The problem I'm seeing is that I get no results back for this query. Even
though, on one of the shards, there is a match on the left and right.

When I add mrn:123 to the right side I get documents back, presumably
because of its returning results like Scenario 1 below! Here's what I'm
noticing:

Scenario1: no matches for either side on the first shard.

#L/R means match count

Shard:  #Left, #Right
1: 0 0
2: 1 100

Scenario 1 doesn't match anything in the first shard but does match in the
second. The result is what I would get if I only queried the second shard.
This is great!

Scenario 2: the first shard matches something on the right but not the left.

Shard:  #Left, #Right
1: 0 100
2: 1 100

Scenario 2 I get back no results.