lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joel Bernstein (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-10512) Innerjoin streaming expressions - Invalid JoinStream error
Date Tue, 18 Apr 2017 15:28:41 GMT

    [ https://issues.apache.org/jira/browse/SOLR-10512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972913#comment-15972913
] 

Joel Bernstein commented on SOLR-10512:
---------------------------------------

Based on the email thread it sounds like the query works if the 'on' parameter is transposed.
The test cases don't cover this exact scenario.

> Innerjoin streaming expressions - Invalid JoinStream error
> ----------------------------------------------------------
>
>                 Key: SOLR-10512
>                 URL: https://issues.apache.org/jira/browse/SOLR-10512
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: search
>    Affects Versions: 6.4.2, 6.5
>         Environment: Debian Jessie
>            Reporter: Dominique Béjean
>
> It looks like innerJoin streaming expression do not work as explained in documentation.
An invalid JoinStream error occurs.
> {noformat}
> curl --data-urlencode 'expr=innerJoin(
>                                 search(books, 
>                                    q="*:*", 
>                                    fl="id", 
>                                    sort="id asc"),
>                                 searchreviews, 
>                                    q="*:*", 
>                                    fl="id_book_s", 
>                                    sort="id_book_s asc"),     
>                                 on="id=id_books_s"
>                             )' http://localhost:8983/solr/books/stream
> 							
> {"result-set":{"docs":[{"EXCEPTION":"Invalid JoinStream - all incoming stream comparators
(sort) must be a superset of this stream's equalitor.","EOF":true}]}}			
> {noformat}
> It is tottaly similar to the documentation example
> 
> {noformat}
> innerJoin(
>   search(people, q=*:*, fl="personId,name", sort="personId asc"),
>   search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
>   on="personId=ownerId"
> )
> {noformat}
> Queries on each collection give :
> {noformat}
> $ curl --data-urlencode 'expr=search(books, 
>                                    q="*:*", 
>                                    fl="id, title_s, pubyear_i", 
>                                    sort="pubyear_i asc", 
>                                    qt="/export")' http://localhost:8983/solr/books/stream
> {
>   "result-set": {
>     "docs": [
>       {
>         "title_s": "Friends",
>         "pubyear_i": 1994,
>         "id": "book2"
>       },
>       {
>         "title_s": "The Way of Kings",
>         "pubyear_i": 2010,
>         "id": "book1"
>       },
>       {
>         "EOF": true,
>         "RESPONSE_TIME": 16
>       }
>     ]
>   }
> }
> $ curl --data-urlencode 'expr=search(reviews, 
>                                    q="author_s:d*", 
>                                    fl="id, id_book_s, stars_i, review_dt", 
>                                    sort="id_book_s asc", 
>                                    qt="/export")' http://localhost:8983/solr/reviews/stream
> 								   
> {
>   "result-set": {
>     "docs": [
>       {
>         "stars_i": 3,
>         "id": "book1_c2",
>         "id_book_s": "book1",
>         "review_dt": "2014-03-15T12:00:00Z"
>       },
>       {
>         "stars_i": 4,
>         "id": "book1_c3",
>         "id_book_s": "book1",
>         "review_dt": "2014-12-15T12:00:00Z"
>       },
>       {
>         "stars_i": 3,
>         "id": "book2_c2",
>         "id_book_s": "book2",
>         "review_dt": "1994-03-15T12:00:00Z"
>       },
>       {
>         "stars_i": 4,
>         "id": "book2_c3",
>         "id_book_s": "book2",
>         "review_dt": "1994-12-15T12:00:00Z"
>       },
>       {
>         "EOF": true,
>         "RESPONSE_TIME": 47
>       }
>     ]
>   }
> }
> {noformat}
> After more tests, I just had to invert the "on" clause to make it work
> {noformat}
> curl --data-urlencode 'expr=innerJoin(
>                                 search(books, 
>                                    q="*:*", 
>                                    fl="id", 
>                                    sort="id asc"),
>                                 searchreviews, 
>                                    q="*:*", 
>                                    fl="id_book_s", 
>                                    sort="id_book_s asc"),     
>                                 on="id_books_s=id"
>                             )' http://localhost:8983/solr/books/stream
> 
> {
>   "result-set": {
>     "docs": [
>       {
>         "title_s": "The Way of Kings",
>         "pubyear_i": 2010,
>         "stars_i": 5,
>         "id": "book1",
>         "id_book_s": "book1",
>         "review_dt": "2015-01-03T14:30:00Z"
>       },
>       {
>         "title_s": "The Way of Kings",
>         "pubyear_i": 2010,
>         "stars_i": 3,
>         "id": "book1",
>         "id_book_s": "book1",
>         "review_dt": "2014-03-15T12:00:00Z"
>       },
>       {
>         "title_s": "The Way of Kings",
>         "pubyear_i": 2010,
>         "stars_i": 4,
>         "id": "book1",
>         "id_book_s": "book1",
>         "review_dt": "2014-12-15T12:00:00Z"
>       },
>       {
>         "title_s": "Friends",
>         "pubyear_i": 1994,
>         "stars_i": 5,
>         "id": "book2",
>         "id_book_s": "book2",
>         "review_dt": "1995-01-03T14:30:00Z"
>       },
>       {
>         "title_s": "Friends",
>         "pubyear_i": 1994,
>         "stars_i": 3,
>         "id": "book2",
>         "id_book_s": "book2",
>         "review_dt": "1994-03-15T12:00:00Z"
>       },
>       {
>         "title_s": "Friends",
>         "pubyear_i": 1994,
>         "stars_i": 4,
>         "id": "book2",
>         "id_book_s": "book2",
>         "review_dt": "1994-12-15T12:00:00Z"
>       },
>       {
>         "EOF": true,
>         "RESPONSE_TIME": 35
>       }
>     ]
>   }
> }
> {noformat}
> However, I don't understand the reason as in debug mode I see the isValidTupleOrder method
should return true in both case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message