Re: Odd behavior with elasticsearch and metapropeties


Robert Dale <rob...@...>
 


Robert Dale

On Tue, Jun 6, 2017 at 12:53 AM, Adam Holley <holl...@...> wrote:
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.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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