I''m working with JSON functionality in sphinx 2.2.2.INDEX table looks like:
mysql> SELECT subsite_min_cnt, version_content_cnt FROM mobile_collection;
+------------------------+-----------------------------------------------------------+
| subsite_min_cnt | version_content_cnt |
+------------------------+-----------------------------------------------------------+
| {"85":3,"75":4,"65":5} | {"10003":4,"10008":5,"10009":5,"11000":7,"1":1,"10000":3} |
| {"85":6,"75":4,"65":5} | {"46":1,"201":1,"11000":1,"10010":1} |
+------------------------+-----------------------------------------------------------+
And I work with two values from JSONs:
mysql> SELECT subsite_min_cnt.85 as a, version_content_cnt.10008 as b
FROM mobile_collection;
+------+------+
| a | b |
+------+------+
| 3 | 5 |
| 6 | NULL |
+------+------+
I try to compare these two value and here is what i get (the json_autoconv_numbers is equal to 1):
mysql> SELECT subsite_min_cnt.85 as a, version_content_cnt.10008 as b
FROM mobile_collection WHERE b IS NOT NULL and a < b;
ERROR 1064 (42000): sphinxql: syntax error, unexpected IDENT, expecting CONST_INT (or 3 other tokens) near 'b'
Or:
mysql> SELECT subsite_min_cnt.85 < version_content_cnt.10008 as b
FROM mobile_collection;
+------+
| b |
+------+
| 0 |
| 0 |
+------+
So, the question is: does comparison of two json values work in sphinxql? Or, maybe, I compare items in wrong way...