Odd behavior with elasticsearch and metapropeties


Adam Holley <holl...@...>
 

Here's the setup.
I have 4 property keys, all part of a Mixed Index.
- name_string, Cardinality.SINGLE, Mapping.STRING.asParameter
- meta_name_string, Cardinality.SINGLE, Mapping.STRING.asParameter
- name_list, Cardinality.LIST, Mapping.STRING.asParameter
- meta_name_list, Cardinality.LIST, Mapping.STRING.asParameter

I created a vertex with a name_string and name_list property.  Then added some meta properties using meta_name_string, and meta_name_list.

The first time I tried to commit, I received the following error:
[0]: index [janusgraph], type [basicIndex], id [388], message [ElasticsearchIllegalArgumentException[failed to execute script]; nested: ScriptException[dyoovy] disabled]; ]
I enabled script execution and was able to commit.  While the metaproperties were not indexed, I did see some additional entries in the name_list when querying the index directly.
e.g.:
From gremlin:
g.V().valueMap()
==> [name_list:[john, john doe, john]]

From elasticsearch:
_index: "janusgraph",
_type: "basicIndex",
_id: "388",
_score: 1,
_source: {
   name_list: [
      "john",
      "john doe",
      "john",
      "john",
      "john",
      "john",
      "john",
      "john",
      "john",
      "john",
      "john"
   ]
}

This may be a bad pattern, but should have I expected adding metaproperties with properties defined in the index to fail since they are not indexed?  Additionally, should trying to use a property with Cardinality != SINGLE, fail for metaproperties?  The additional items in the name_list in the index are not really a problem since I get the properties from gremlin, but it seems like it might be a problem.  Or am I doing something wrong when creating the index?

Thanks.
Adam.

Join {janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.