| | |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.spi.IndexQueryFactory; |
| | | import org.forgerock.opendj.ldap.spi.IndexingOptions; |
| | | import org.opends.server.backends.pluggable.AttributeIndex.IndexFilterType; |
| | | import org.opends.server.backends.pluggable.spi.Cursor; |
| | | import org.opends.server.backends.pluggable.spi.ReadableTransaction; |
| | | import org.opends.server.backends.pluggable.spi.StorageRuntimeException; |
| | |
| | | return new IndexQuery() |
| | | { |
| | | @Override |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage) |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage, StringBuilder indexNameOut) |
| | | { |
| | | // Read the tree and get Record for the key. |
| | | // Select the right index to be used. |
| | |
| | | debugMessage.append(INFO_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, |
| | | attributeIndex.getAttributeType().getNameOrOID())); |
| | | } |
| | | return createMatchAllQuery().evaluate(debugMessage); |
| | | return createMatchAllQuery().evaluate(debugMessage, indexNameOut); |
| | | } |
| | | |
| | | final EntryIDSet entrySet = index.get(txn, key); |
| | |
| | | return new IndexQuery() |
| | | { |
| | | @Override |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage) |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage, StringBuilder indexNameOut) |
| | | { |
| | | final Index index = attributeIndex.getNameToIndexes().get(indexID); |
| | | if (index == null) |
| | |
| | | debugMessage.append(INFO_INDEX_FILTER_INDEX_TYPE_DISABLED.get(indexID, |
| | | attributeIndex.getAttributeType().getNameOrOID())); |
| | | } |
| | | return createMatchAllQuery().evaluate(debugMessage); |
| | | return createMatchAllQuery().evaluate(debugMessage, indexNameOut); |
| | | } |
| | | |
| | | final EntryIDSet entrySet = readRange(index, txn, lowerBound, upperBound, includeLowerBound, includeUpperBound); |
| | |
| | | return new IndexQuery() |
| | | { |
| | | @Override |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage) |
| | | public EntryIDSet evaluate(LocalizableMessageBuilder debugMessage, StringBuilder indexNameOut) |
| | | { |
| | | final String indexID = PRESENCE_INDEX_KEY; |
| | | final Index index = attributeIndex.getNameToIndexes().get(indexID); |
| | |
| | | { |
| | | updateStatsUndefinedResults(debugMessage, index); |
| | | } |
| | | if (indexNameOut != null) |
| | | { |
| | | indexNameOut.append(IndexFilterType.PRESENCE.toString()); |
| | | } |
| | | return entrySet; |
| | | } |
| | | |