private void IndexProperties(long id)
 {
     while (_propertyCursor.next())
     {
         int propertyKey = _propertyCursor.propertyKey();
         int index       = _propKeyToIndex.getIfAbsent(propertyKey, -1);
         if (index != -1)
         {
             _propertyValues[index] = _propertyCursor.propertyValue();
         }
     }
     if (_modifiedEntityIdsInThisTransaction.add(id))
     {
         try
         {
             _writer.addDocument(documentRepresentingProperties(id, _descriptor.propertyNames(), _propertyValues));
         }
         catch (IOException e)
         {
             throw new UncheckedIOException(e);
         }
     }
     Arrays.fill(_propertyValues, null);
 }
Exemple #2
0
        private bool AcceptByStoreFiltering(long reference, int storeLookups, Value[] values)
        {
            // Initialize the property cursor scan
            _read.singleNode(reference, _node);
            if (!_node.next())
            {
                // This node doesn't exist, therefore it cannot be accepted
                _property.close();
                return(false);
            }
            _node.properties(_property);

            while (storeLookups > 0 && _property.next())
            {
                for (int i = 0; i < _filters.Length; i++)
                {
                    IndexQuery filter = _filters[i];
                    if (filter != null && (values == null || values[i] == NO_VALUE) && _property.propertyKey() == filter.PropertyKeyId())
                    {
                        if (!filter.AcceptsValueAt(_property))
                        {
                            return(false);
                        }
                        storeLookups--;
                    }
                }
            }
            return(storeLookups == 0);
        }