diff --git a/.classpath b/.classpath index 7ea5628c9..4f24aceb9 100644 --- a/.classpath +++ b/.classpath @@ -47,13 +47,7 @@ - - - - - - @@ -62,6 +56,13 @@ + + + + + + + diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist index 6bf06f64f..72a6b2a2e 100644 --- a/addon/YaCy.app/Contents/Info.plist +++ b/addon/YaCy.app/Contents/Info.plist @@ -73,12 +73,13 @@ $JAVAROOT/lib/json-simple-1.1.jar $JAVAROOT/lib/log4j-1.2.16.jar $JAVAROOT/lib/log4j-over-slf4j-1.6.1.jar - $JAVAROOT/lib/lucene-analyzers-3.6.0.jar - $JAVAROOT/lib/lucene-core-3.6.0.jar - $JAVAROOT/lib/lucene-highlighter-3.6.0.jar - $JAVAROOT/lib/lucene-phonetic-3.6.0.jar - $JAVAROOT/lib/lucene-spatial-3.6.0.jar - $JAVAROOT/lib/lucene-spellchecker-3.6.0.jar + $JAVAROOT/lib/lucene-analyzers-3.6.1.jar + $JAVAROOT/lib/lucene-grouping-3.6.1.jar + $JAVAROOT/lib/lucene-core-3.6.1.jar + $JAVAROOT/lib/lucene-highlighter-3.6.1.jar + $JAVAROOT/lib/lucene-phonetic-3.6.1.jar + $JAVAROOT/lib/lucene-spatial-3.6.1.jar + $JAVAROOT/lib/lucene-spellchecker-3.6.1.jar $JAVAROOT/lib/metadata-extractor-2.4.0-beta-1.jar $JAVAROOT/lib/mysql-connector-java-5.1.12-bin.jar $JAVAROOT/lib/pdfbox-1.7.0.jar diff --git a/build.xml b/build.xml index 5e3d18b3d..71d78eb61 100644 --- a/build.xml +++ b/build.xml @@ -193,12 +193,13 @@ - - - - - - + + + + + + + diff --git a/lib/lucene-analyzers-3.6.0.jar b/lib/lucene-analyzers-3.6.1.jar similarity index 92% rename from lib/lucene-analyzers-3.6.0.jar rename to lib/lucene-analyzers-3.6.1.jar index d7e5ccf77..889d9c7bd 100644 Binary files a/lib/lucene-analyzers-3.6.0.jar and b/lib/lucene-analyzers-3.6.1.jar differ diff --git a/lib/lucene-core-3.6.0.jar b/lib/lucene-core-3.6.1.jar similarity index 85% rename from lib/lucene-core-3.6.0.jar rename to lib/lucene-core-3.6.1.jar index 5cb8dae5b..5e5753b61 100644 Binary files a/lib/lucene-core-3.6.0.jar and b/lib/lucene-core-3.6.1.jar differ diff --git a/lib/lucene-grouping-3.6.1.jar b/lib/lucene-grouping-3.6.1.jar new file mode 100644 index 000000000..316bd7a86 Binary files /dev/null and b/lib/lucene-grouping-3.6.1.jar differ diff --git a/lib/lucene-highlighter-3.6.0.jar b/lib/lucene-highlighter-3.6.1.jar similarity index 90% rename from lib/lucene-highlighter-3.6.0.jar rename to lib/lucene-highlighter-3.6.1.jar index f07b95df4..a53fac762 100644 Binary files a/lib/lucene-highlighter-3.6.0.jar and b/lib/lucene-highlighter-3.6.1.jar differ diff --git a/lib/lucene-phonetic-3.6.0.jar b/lib/lucene-phonetic-3.6.1.jar similarity index 89% rename from lib/lucene-phonetic-3.6.0.jar rename to lib/lucene-phonetic-3.6.1.jar index c10979b07..3ac6f9f3c 100644 Binary files a/lib/lucene-phonetic-3.6.0.jar and b/lib/lucene-phonetic-3.6.1.jar differ diff --git a/lib/lucene-spatial-3.6.0.jar b/lib/lucene-spatial-3.6.1.jar similarity index 89% rename from lib/lucene-spatial-3.6.0.jar rename to lib/lucene-spatial-3.6.1.jar index c94aaad8c..6d4d84abe 100644 Binary files a/lib/lucene-spatial-3.6.0.jar and b/lib/lucene-spatial-3.6.1.jar differ diff --git a/lib/lucene-spellchecker-3.6.0.jar b/lib/lucene-spellchecker-3.6.1.jar similarity index 75% rename from lib/lucene-spellchecker-3.6.0.jar rename to lib/lucene-spellchecker-3.6.1.jar index 3cbc48909..b3a176399 100644 Binary files a/lib/lucene-spellchecker-3.6.0.jar and b/lib/lucene-spellchecker-3.6.1.jar differ diff --git a/source/net/yacy/kelondro/blob/Tables.java b/source/net/yacy/kelondro/blob/Tables.java index 04130ed58..e17be9060 100644 --- a/source/net/yacy/kelondro/blob/Tables.java +++ b/source/net/yacy/kelondro/blob/Tables.java @@ -63,7 +63,7 @@ public class Tables implements Iterable { public final static String CIDX = "_cidx"; public final static int NOINDEX = 50000; public final static int RAMINDEX = 100000; - + private static final String suffix = ".bheap"; private static final String system_table_pkcounter = "pkcounter"; private static final String system_table_pkcounter_counterName = "pk"; @@ -95,7 +95,7 @@ public class Tables implements Iterable { } this.cidx = new ConcurrentHashMap(); } - + public TablesColumnIndex getIndex(final String tableName, TablesColumnIndex.INDEXTYPE indexType) throws Exception { final TablesColumnIndex index; switch(indexType) { @@ -104,7 +104,7 @@ public class Tables implements Iterable { break; case BLOB: final String idx_table = tableName+CIDX; - BEncodedHeap bheap; + BEncodedHeap bheap; bheap = this.getHeap(idx_table); index = new TablesColumnBLOBIndex(bheap); break; @@ -113,13 +113,13 @@ public class Tables implements Iterable { } return index; } - + public TablesColumnIndex getIndex(final String tableName) throws Exception { // return an existing index if(this.cidx.containsKey(tableName)) { return this.cidx.get(tableName); } - + // create a new index int size; try { @@ -129,15 +129,15 @@ public class Tables implements Iterable { } final TablesColumnIndex index; - + if(size < NOINDEX) { - throw new Exception("TableColumnIndex not available for tables with less than "+NOINDEX+" rows: "+tableName); - } + throw new RuntimeException("TableColumnIndex not available for tables with less than "+NOINDEX+" rows: "+tableName); + } if(size < RAMINDEX) { index = new TablesColumnRAMIndex(); } else { final String idx_table = tableName+CIDX; - BEncodedHeap bheap; + BEncodedHeap bheap; try { bheap = this.getHeap(idx_table); } catch (IOException e) { @@ -146,20 +146,20 @@ public class Tables implements Iterable { } if(bheap != null) { index = new TablesColumnBLOBIndex(bheap); - } else { + } else { index = new TablesColumnRAMIndex(); - } + } } - this.cidx.put(tableName, index); + this.cidx.put(tableName, index); return index; } - + public boolean hasIndex (final String tableName) { return this.cidx.contains(tableName); } - + public boolean hasIndex (final String tableName, final String columnName) { - if(this.cidx.containsKey(tableName)) { + if(this.cidx.containsKey(tableName)) { return this.cidx.get(tableName).hasIndex(columnName); } try { @@ -168,22 +168,22 @@ public class Tables implements Iterable { } } catch (IOException e) { Log.logException(e); - } + } return false; } - public Iterator getByIndex(final String table, final String whereColumn, final String separator, final String whereValue) { + public Iterator getByIndex(final String table, final String whereColumn, final String separator, final String whereValue) { final HashSet rows = new HashSet(); final TreeSet set1 = new TreeSet(TablesColumnIndex.NATURALORDER); final TreeSet set2 = new TreeSet(TablesColumnIndex.NATURALORDER); final String[] values = whereValue.split(separator); if(this.hasIndex(table, whereColumn)) { - try { + try { final TablesColumnIndex index = this.getIndex(table); for(int i=0; i biter = index.get(whereColumn, values[i]).iterator(); - while(biter.hasNext()) { + while(biter.hasNext()) { set1.add(biter.next()); } if(i==0) { @@ -192,12 +192,12 @@ public class Tables implements Iterable { set2.retainAll(set1); } set1.clear(); - } + } } for(byte[] pk : set2) { rows.add(this.select(table, pk)); } - + } catch (Exception e) { Log.logException(e); return new HashSet().iterator(); @@ -214,10 +214,10 @@ public class Tables implements Iterable { patternBuilder.append(p3); patternBuilder.append(values.length); patternBuilder.append('}'); - final Pattern p = Pattern.compile(patternBuilder.toString(), Pattern.CASE_INSENSITIVE); + final Pattern p = Pattern.compile(patternBuilder.toString(), Pattern.CASE_INSENSITIVE); try { return this.iterator(table, whereColumn, p); - } catch (IOException e) { + } catch (IOException e) { Log.logException(e); return new HashSet().iterator(); }