コード例 #1
0
        internal FulltextIndexTransactionState(FulltextIndexProvider provider, Log log, IndexReference indexReference)
        {
            FulltextIndexAccessor accessor = provider.GetOpenOnlineAccessor(( StoreIndexDescriptor )indexReference);

            log.Debug("Acquired online fulltext schema index accessor, as base accessor for transaction state: %s", accessor);
            _descriptor = accessor.Descriptor;
            SchemaDescriptor schema = _descriptor.schema();

            _toCloseLater = new List <AutoCloseable>();
            _writer       = accessor.TransactionStateIndexWriter;
            _modifiedEntityIdsInThisTransaction = new LongHashSet();
            _visitingNodes  = Schema.entityType() == EntityType.NODE;
            _txStateVisitor = new FulltextIndexTransactionStateVisitor(_descriptor, _modifiedEntityIdsInThisTransaction, _writer);
        }
コード例 #2
0
 internal FulltextIndexTransactionStateVisitor(FulltextIndexDescriptor descriptor, MutableLongSet modifiedEntityIdsInThisTransaction, TransactionStateLuceneIndexWriter writer)
 {
     this._descriptor = descriptor;
     this._schema     = descriptor.Schema();
     this._modifiedEntityIdsInThisTransaction = modifiedEntityIdsInThisTransaction;
     this._writer        = writer;
     this._visitingNodes = _schema.entityType() == EntityType.NODE;
     _entityTokenIds     = _schema.EntityTokenIds;
     int[] propertyIds = _schema.PropertyIds;
     _propertyValues = new Value[propertyIds.Length];
     _propKeyToIndex = new IntIntHashMap();
     for (int i = 0; i < propertyIds.Length; i++)
     {
         _propKeyToIndex.put(propertyIds[i], i);
     }
 }