{"action":"opened","issue":{"url":"https://api.github.com/repos/Stratio/cassandra-lucene-index/issues/210","repository_url":"https://api.github.com/repos/Stratio/cassandra-lucene-index","labels_url":"https://api.github.com/repos/Stratio/cassandra-lucene-index/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/Stratio/cassandra-lucene-index/issues/210/comments","events_url":"https://api.github.com/repos/Stratio/cassandra-lucene-index/issues/210/events","html_url":"https://github.com/Stratio/cassandra-lucene-index/issues/210","id":182369936,"number":210,"title":"'NoneType' object has no attribute 'sub_types' for query map index","user":{"login":"wanghong230","id":2680725,"avatar_url":"https://avatars.githubusercontent.com/u/2680725?v=3","gravatar_id":"","url":"https://api.github.com/users/wanghong230","html_url":"https://github.com/wanghong230","followers_url":"https://api.github.com/users/wanghong230/followers","following_url":"https://api.github.com/users/wanghong230/following{/other_user}","gists_url":"https://api.github.com/users/wanghong230/gists{/gist_id}","starred_url":"https://api.github.com/users/wanghong230/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanghong230/subscriptions","organizations_url":"https://api.github.com/users/wanghong230/orgs","repos_url":"https://api.github.com/users/wanghong230/repos","events_url":"https://api.github.com/users/wanghong230/events{/privacy}","received_events_url":"https://api.github.com/users/wanghong230/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T20:46:47Z","updated_at":"2016-10-11T20:46:47Z","closed_at":null,"body":"Cassandra version: 3.7\r\nLucene Index version: 3.7.1\r\n\r\n\r\n```SQL\r\ncqlsh:axdb> CREATE KEYSPACE test\r\n        ...   WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };\r\ncqlsh:axdb> use test;\r\ncqlsh:test> CREATE TABLE user_profiles (\r\n        ...    login text PRIMARY KEY,\r\n        ...    first_name text,\r\n        ...    last_name text,\r\n        ...    addresses map<text,text>\r\n        ... );\r\ncqlsh:test> \r\ncqlsh:test> CREATE CUSTOM INDEX test_index ON test.user_profiles()\r\n        ... USING 'com.stratio.cassandra.lucene.Index'\r\n        ... WITH OPTIONS = {\r\n        ...    'refresh_seconds': '1',\r\n        ...    'schema': '{\r\n        ...       fields: {\r\n        ...          addresses: {type: \"string\"}\r\n        ...       }\r\n        ...    }'\r\n        ... };\r\ncqlsh:test> INSERT INTO user_profiles (login, first_name, last_name, addresses)\r\n        ...    VALUES('user','Peter','Handsome',\r\n        ...            {'San Francisco':'Market street 2', 'Madrid': 'Calle Velazquez' })\r\n        ... ;\r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> select * from user_profiles ;\r\n\r\n login | addresses                                                         | first_name | last_name\r\n-------+-------------------------------------------------------------------+------------+-----------\r\n  user | {'Madrid': 'Calle Velazquez', 'San Francisco': 'Market street 2'} |      Peter |  Handsome\r\n\r\n(1 rows)\r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(tweets_index,'{\r\n        ...    filter: {\r\n        ...       type: \"match\",\r\n        ...       field: \"cities$Madrid\",\r\n        ...       value: \"San Francisco\"\r\n        ...    }\r\n        ... }');\r\nInvalidRequest: code=2200 [Invalid query] message=\"Invalid index expression, index tweets_index not found for test.user_profiles\"\r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(test_index,'{\r\n        ...    filter: {\r\n        ...       type: \"match\",\r\n        ...       field: \"cities$Madrid\",\r\n        ...       value: \"San Francisco\"\r\n        ...    }\r\n        ... }');\r\nInvalidRequest: code=2200 [Invalid query] message=\"No mapper found for field 'cities$Madrid'\"\r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(test_index,'{    filter: {       type: \"match\",       field: \"addresses$Madrid\",       value: \"San Francisco\"    } }');\r\n\r\n login | addresses | first_name | last_name\r\n-------+-----------+------------+-----------\r\n\r\n(0 rows)\r\ncqlsh:test> \r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(test_index,'{    filter: {       type: \"wildcard\",       field: \"addresses$Madrid\",       value: \"*Ca*\"    } }');\r\n\r\n login | addresses                                                                                          | first_name | last_name\r\n-------+----------------------------------------------------------------------------------------------------+------------+-----------\r\n  user | OrderedMapSerializedKey([(u'Madrid', u'Calle Velazquez'), (u'San Francisco', u'Market street 2')]) |      Peter |  Handsome\r\n\r\n(1 rows)\r\nFailed to format value OrderedMapSerializedKey([(u'Madrid', u'Calle Velazquez'), (u'San Francisco', u'Market street 2')]) : 'NoneType' object has no attribute 'sub_types'\r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> \r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(test_index,'{    filter: {       type: \"match\",       field: \"addresses$Madrid\",       value: \"San Francisco\"    } }');\r\n\r\n login | addresses | first_name | last_name\r\n-------+-----------+------------+-----------\r\n\r\n(0 rows)\r\ncqlsh:test> SELECT * FROM user_profiles WHERE expr(test_index,'{    filter: {       type: \"match\",       field: \"addresses$Madrid\",       value: \"Calle Velazquez\"    } }');\r\n\r\n login | addresses                                                                                          | first_name | last_name\r\n-------+----------------------------------------------------------------------------------------------------+------------+-----------\r\n  user | OrderedMapSerializedKey([(u'Madrid', u'Calle Velazquez'), (u'San Francisco', u'Market street 2')]) |      Peter |  Handsome\r\n\r\n(1 rows)\r\nFailed to format value OrderedMapSerializedKey([(u'Madrid', u'Calle Velazquez'), (u'San Francisco', u'Market street 2')]) : 'NoneType' object has no attribute 'sub_types'\r\n```"}}
{"actor":{"display_login":"wanghong230"}}