Thanks Joel, see: SOLR-9146

On Sat, May 21, 2016 at 3:39 PM, Joel Bernstein <joels...@gmail.com> wrote:
> Also agreed we should throw an exception in this scenario until it's
> implemented.
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Sat, May 21, 2016 at 5:34 PM, Joel Bernstein <joels...@gmail.com> wrote:
>
>> Yes, currently only Solr range syntax is supported. The SQL greater, less
>> than syntax isn't yet supported.
>>
>> This isn't explicitly stated in the docs, which would be a good first step.
>>
>> Supporting SQL greater and less then predicates should not be too
>> difficult. Feel free to create a jira ticket for this.
>>
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>> On Sat, May 21, 2016 at 10:55 AM, Timothy Potter <thelabd...@gmail.com>
>> wrote:
>>
>>> this gives expected result:
>>>
>>>      SELECT title_s, COUNT(*) as cnt
>>>         FROM movielens
>>>      WHERE genre_ss='action' AND rating_i='[4 TO 5]'
>>> GROUP BY title_s
>>> ORDER BY cnt desc
>>>          LIMIT 5
>>>
>>> but using >= 4 doesn't give same results (my ratings are 1-5):
>>>
>>>       SELECT title_s, COUNT(*) as cnt
>>>          FROM movielens
>>>       WHERE genre_ss='action' AND rating_i >= 4
>>> GROUP BY title_s
>>> ORDER BY cnt desc
>>>           LIMIT 5
>>>
>>> on the Solr side, I see queries forumlated as:
>>>
>>> 2016-05-21 14:53:43.096 INFO  (qtp1435804085-1419) [c:movielens
>>> s:shard1 r:core_node1 x:movielens_shard1_replica1] o.a.s.c.S.Request
>>> [movielens_shard1_replica1]  webapp=/solr path=/export
>>>
>>> params={q=((genre_ss:"action")+AND+(rating_i:"4"))&distrib=false&fl=title_s&sort=title_s+desc&wt=json&version=2.2}
>>> hits=2044 status=0 QTime=0
>>>
>>> which is obviously wrong ... known issue or should I open a JIRA?
>>>
>>> In general, rather than crafting an incorrect query that gives the
>>> wrong results, we should throw an exception stating that the syntax is
>>> not supported.
>>>
>>
>>

Reply via email to