Author: rareddy
Date: 2010-06-03 17:09:16 -0400 (Thu, 03 Jun 2010)
New Revision: 2173
Modified:
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
Log:
TEIID-1074: Allowing to scan all the ".index" files in the case of that typed
indexed files are not provided.
Modified: trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java
===================================================================
---
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-06-02
14:58:30 UTC (rev 2172)
+++
trunk/metadata/src/main/java/org/teiid/metadata/index/IndexMetadataFactory.java 2010-06-03
21:09:16 UTC (rev 2173)
@@ -625,7 +625,11 @@
private IEntryResult[] queryIndex(char recordType, final char[] pattern, boolean
isPrefix, boolean isCaseSensitive, boolean returnFirstMatch) {
// The the index file name for the record type
final String indexName =
SimpleIndexUtil.getIndexFileNameForRecordType(recordType);
- Index[] search = SimpleIndexUtil.getIndexes(indexName, this.indexes);
+ Index[] search = SimpleIndexUtil.getIndexes(indexName, this.indexes);
+
+ if (search.length == 0) {
+ search = this.indexes;
+ }
try {
return SimpleIndexUtil.queryIndex(search, pattern, isPrefix, isCaseSensitive,
returnFirstMatch);
Show replies by date