| | |
| | | { |
| | | processIndexes(suffix, entry, entryID); |
| | | } |
| | | processVLVIndexes(suffix, entry, entryID); |
| | | importCount.getAndIncrement(); |
| | | } |
| | | |
| | |
| | | { |
| | | for (Map.Entry<AttributeType, AttributeIndex> mapEntry : suffix.getAttrIndexMap().entrySet()) |
| | | { |
| | | AttributeType attributeType = mapEntry.getKey(); |
| | | fillIndexKey(suffix, mapEntry.getValue(), entry, attributeType, entryID); |
| | | fillIndexKey(mapEntry.getValue(), entry, mapEntry.getKey(), entryID); |
| | | } |
| | | } |
| | | |
| | |
| | | processDN2ID(suffix, entryDN, entryID); |
| | | processDN2URI(suffix, null, entry); |
| | | processIndexes(suffix, entry, entryID); |
| | | processVLVIndexes(suffix, entry, entryID); |
| | | suffix.getID2Entry().put(txn, entryID, entry); |
| | | importCount.getAndIncrement(); |
| | | } |
| | |
| | | AttributeType attributeType = mapEntry.getKey(); |
| | | if (entry.hasAttribute(attributeType)) |
| | | { |
| | | fillIndexKey(suffix, mapEntry.getValue(), entry, attributeType, entryID); |
| | | fillIndexKey(mapEntry.getValue(), entry, attributeType, entryID); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void fillIndexKey(Suffix suffix, AttributeIndex attrIndex, Entry entry, AttributeType attrType, EntryID entryID) |
| | | void fillIndexKey(AttributeIndex attrIndex, Entry entry, AttributeType attrType, EntryID entryID) |
| | | throws InterruptedException, DirectoryException, StorageRuntimeException |
| | | { |
| | | final IndexingOptions options = attrIndex.getIndexingOptions(); |
| | |
| | | processAttribute(attrIndex.getOrderingIndex(), ImportIndexType.ORDERING, entry, attrType, entryID, options); |
| | | processAttribute(attrIndex.getApproximateIndex(), ImportIndexType.APPROXIMATE, entry, attrType, entryID, options); |
| | | |
| | | final EntryContainer entryContainer = suffix.getEntryContainer(); |
| | | final IndexBuffer buffer = new IndexBuffer(entryContainer); |
| | | for (VLVIndex vlvIdx : entryContainer.getVLVIndexes()) |
| | | { |
| | | vlvIdx.addEntry(buffer, entryID, entry); |
| | | } |
| | | buffer.flush(txn); |
| | | |
| | | Map<String, Collection<Index>> extensibleMap = attrIndex.getExtensibleIndexes(); |
| | | if (!extensibleMap.isEmpty()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | void processVLVIndexes(Suffix suffix, Entry entry, EntryID entryID) throws DirectoryException |
| | | { |
| | | final EntryContainer entryContainer = suffix.getEntryContainer(); |
| | | final IndexBuffer buffer = new IndexBuffer(entryContainer); |
| | | for (VLVIndex vlvIdx : entryContainer.getVLVIndexes()) |
| | | { |
| | | vlvIdx.addEntry(buffer, entryID, entry); |
| | | } |
| | | buffer.flush(txn); |
| | | } |
| | | |
| | | private void processAttributes(Collection<Index> indexes, ImportIndexType indexType, Entry entry, |
| | | AttributeType attributeType, EntryID entryID, IndexingOptions options) throws InterruptedException |
| | | { |