[ https://issues.apache.org/jira/browse/GEODE-2266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15802064#comment-15802064 ]
Jason Huynh commented on GEODE-2266: ------------------------------------ It looks like this only affects indexes created without a region alias. If an alias is used, a different path is executed which allows the index to be created even with a value-constraint. the following create index expression will cause the issue if there is a value-constraint : createIndex("index", "id", "/region") but this expression will not fail createIndex("index", "r.id", "/region r") Two work arounds exist. 1.) do not put a value constraint on the region. 2.) use an alias. The fix itself will require a little more code inspection/debugging. > index creation with value constraint of PdxInstance should not validate > indexed field > ------------------------------------------------------------------------------------- > > Key: GEODE-2266 > URL: https://issues.apache.org/jira/browse/GEODE-2266 > Project: Geode > Issue Type: Bug > Components: querying > Reporter: Jason Huynh > Assignee: Jason Huynh > > When creating an index on a region with a value constraint, we validate that > the indexed field exists as a value for the value constraint object type. It > makes sense to validate this field exists on a user domain object as the > index would be useless if the field did not exist for the only object type > for this region. However if the value constraint is a PdxInstance, we should > not validate this field exists and instead treat it similar to a non value > constrained region. This is because the PdxInstance can represent any object > type and the field is not specifically a field on the PdxInstance object but > rather a field on the pdx serialized object. -- This message was sent by Atlassian JIRA (v6.3.4#6332)