{"action":"opened","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6997","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6997/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6997/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/6997/events","html_url":"https://github.com/orientechnologies/orientdb/issues/6997","id":195067942,"number":6997,"title":"If a Lucene index exists, Parser defaults to Lucene ---- even when the selected index is not Lucene","user":{"login":"lasagnaman","id":4855738,"avatar_url":"https://avatars.githubusercontent.com/u/4855738?v=3","gravatar_id":"","url":"https://api.github.com/users/lasagnaman","html_url":"https://github.com/lasagnaman","followers_url":"https://api.github.com/users/lasagnaman/followers","following_url":"https://api.github.com/users/lasagnaman/following{/other_user}","gists_url":"https://api.github.com/users/lasagnaman/gists{/gist_id}","starred_url":"https://api.github.com/users/lasagnaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasagnaman/subscriptions","organizations_url":"https://api.github.com/users/lasagnaman/orgs","repos_url":"https://api.github.com/users/lasagnaman/repos","events_url":"https://api.github.com/users/lasagnaman/events{/privacy}","received_events_url":"https://api.github.com/users/lasagnaman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-12T19:48:58Z","updated_at":"2016-12-12T19:48:58Z","closed_at":null,"body":"Except where specified, we are using com.tinkerpop.blueprints.impls.orient.OrientBaseGraph and associated APIs.\n \nWe have a vertex class called Foo, with a single property \"value\". We have two indexes called Foo.value, and Foo.value_fulltext_lucene. The first is an SBTREE UNIQUE index, and the latter is a LUCENE FULLTEXT index; both have the keyproperty \"value\". We make a call to OrientBaseGraph.getVertices(final String iKey, Object iValue), with parameters iKey = \"Foo.value\" and iValue = \"blahblah / foobar\". (This vertex exists in the DB and can be verified through OrientDB Studio.) The result is unexpected:\n \nException in thread \"main\" com.orientechnologies.orient.core.index.OIndexEngineException: Error parsing lucene query\n<…snip…>\nCaused by: com.orientechnologies.orient.core.sql.parser.ParseException: Cannot parse 'blahblah / foobar': Lexical error at line 1, column 36.  Encountered: <EOF> after : \"/ foobar\"\n \nIt seems like the query value is being treated as a Lucene query, and the parser breaks down because the Lucene regex doesn't have a closing / character. If I properly escape the / character, then nothing \"breaks\", but it's still being parsed as a Lucene query and returns hundreds of records (instead of the single match). But I don't want to be using a Lucene query here! Any ideas? Is there maybe some setting for the \"default index\" or \"default query parser\" on the DB itself?\n \n* If I query a Vertex class/index that does NOT have a Lucene index (e.g. has only the SBTREE UNIQUE index Bar.value) then the query works as expected. In this case, / is not treated as a special Lucene character, it returns a single vertex, etc.\n* The same (broken) behavior happens if I use OrientBaseGraph.getVertices(final String label, final String[] iKey, Object[] iValue)."}}
{"actor":{"display_login":"lasagnaman"}}