- replaced usage of temporary IndexEntity by EntryContainer
- added more attributes to word index
- added exact-string search (using quotes in query)
- disabled writing into WORDS during search; EntryContainers are used instead
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1485 6c8d7289-2bf4-0310-a012-ef5d649a1542
prop.put("result",(result==null)?("Successfully transferred "+indexes[0].size()+" words in "+((System.currentTimeMillis()-starttime)/1000)+" seconds"):result);
try{indexes[0].close();}catch(IOExceptione){}
indexes[0]=null;
indexes=null;
}
// generate list
@ -431,15 +431,15 @@ public class IndexControl_p {
@ -497,13 +497,12 @@ public class IndexControl_p {
.append("<span class=\"small\">for every resolveable and deleted URL reference, delete the same reference at every other word where the reference exists (very extensive, but prevents further unresolved references)</span>")
@ -190,7 +178,7 @@ public final class plasmaSearchEvent extends Thread implements Runnable {
log.logFine("STARTING "+fetchpeers+" THREADS TO CATCH EACH "+profileGlobal.getTargetCount(plasmaSearchProfile.PROCESS_POSTSORT)+" URLs WITHIN "+(profileGlobal.duetime()/1000)+" SECONDS");
@ -201,33 +201,33 @@ public final class plasmaWordIndexDistribution {
// collect index
StringstartPointHash=selectTransferStart();
log.logFine("Selected hash "+startPointHash+" as start point for index distribution, distance = "+yacyDHTAction.dhtDistance(yacyCore.seedDB.mySeed.hash,startPointHash));
log.logInfo("Index transfer of "+indexCount+" words ["+indexEntities[0].wordHash()+" .. "+indexEntities[indexEntities.length-1].wordHash()+"] to peer "+seeds[i].getName()+":"+seeds[i].hash+" in "+((System.currentTimeMillis()-start)/1000)
log.logInfo("Index transfer of "+indexCount+" words ["+indexContainers[0].wordHash()+" .. "+indexContainers[indexContainers.length-1].wordHash()+"] to peer "+seeds[i].getName()+":"+seeds[i].hash+" in "+((System.currentTimeMillis()-start)/1000)
@ -404,7 +364,7 @@ public final class plasmaWordIndexDistribution {
unknownURLEntries.add(indexEntry.getUrlHash());
}else{
knownURLs.put(indexEntry.getUrlHash(),lurl);
tmpEntity.addEntry(indexEntry);
indexContainer.add(indexEntry);
count--;
}
}catch(IOExceptione){
@ -426,8 +386,8 @@ public final class plasmaWordIndexDistribution {
}
// use whats remaining
this.log.logFine("Selected partial index ("+tmpEntity.size()+" from "+indexEntity.size()+" URLs, "+unknownURLEntries.size()+" not bound) for word "+tmpEntity.wordHash());
tmpEntities.add(tmpEntity);
this.log.logFine("Selected partial index ("+indexContainer.size()+" from "+indexEntity.size()+" URLs, "+unknownURLEntries.size()+" not bound) for word "+indexContainer.wordHash());
tmpContainers.add(indexContainer);
}catch(kelondroExceptione){
this.log.logSevere("plasmaWordIndexDistribution/2: deleted DB for word "+indexEntity.wordHash(),e);
indexEntity.deleteComplete();
@ -438,8 +398,8 @@ public final class plasmaWordIndexDistribution {
plasmaWordIndexDistribution.this.log.logInfo("Index transfer of "+idxCount+" words ["+indexEntities[0].wordHash()+" .. "+indexEntities[indexEntities.length-1].wordHash()+"]"+
plasmaWordIndexDistribution.this.log.logInfo("Index transfer of "+idxCount+" words ["+indexContainers[0].wordHash()+" .. "+indexContainers[indexContainers.length-1].wordHash()+"]"+
" to peer "+seed.getName()+":"+seed.hash+" in "+(transferTime/1000)+" seconds successfull ("+
(1000*idxCount/(transferTime+1))+" words/s)");
retryCount=0;
@ -817,7 +805,7 @@ public final class plasmaWordIndexDistribution {
startPointHash=newIndexEntities[newIndexEntities.length-1].wordHash();// DHT targets must have greater hashes
startPointHash=newIndexContainers[newIndexContainers.length-1].wordHash();// DHT targets must have greater hashes
selectionEnd=System.currentTimeMillis();
selectionTime=selectionEnd-selectionStart;
plasmaWordIndexDistribution.this.log.logInfo("Index selection of "+idxCount+" words ["+newIndexEntities[0].wordHash()+" .. "+newIndexEntities[newIndexEntities.length-1].wordHash()+"]"+
plasmaWordIndexDistribution.this.log.logInfo("Index selection of "+idxCount+" words ["+newIndexContainers[0].wordHash()+" .. "+newIndexContainers[newIndexContainers.length-1].wordHash()+"]"+
" in "+
(selectionTime/1000)+" seconds ("+
(1000*idxCount/(selectionTime+1))+" words/s)");
@ -886,10 +874,10 @@ public final class plasmaWordIndexDistribution {
this.status="Aborted because of Transfer error:\n"+worker.getStatus();
// cleanup. closing all open files
closeEntities(oldIndexEntities);
oldIndexEntities =null;
closeEntities(newIndexEntities);
newIndexEntities =null;
closeContainers(oldIndexContainers);
oldIndexContainers =null;
closeContainers(newIndexContainers);
newIndexContainers =null;
// abort index transfer
return;
@ -922,10 +910,10 @@ public final class plasmaWordIndexDistribution {
if(delete){
this.status="Running: Deleting chunk "+iteration;
try{
if(deleteTransferIndexes(oldIndexEntities)){
plasmaWordIndexDistribution.this.log.logFine("Deleted all "+oldIndexEntities.length+" transferred whole-word indexes locally");
if(deleteTransferIndexes(oldIndexContainers)){
plasmaWordIndexDistribution.this.log.logFine("Deleted all "+oldIndexContainers.length+" transferred whole-word indexes locally");
transferedEntryCount+=idxCount;
transferedEntityCount+=oldIndexEntities.length;
transferedEntityCount+=oldIndexContainers.length;
}else{
plasmaWordIndexDistribution.this.log.logSevere("Deleted not all transferred whole-word indexes");
}
@ -933,18 +921,18 @@ public final class plasmaWordIndexDistribution {
plasmaWordIndexDistribution.this.log.logSevere("Deletion of indexes not possible:"+ee.getMessage(),ee);
if((singleContainer==null)||(singleContainer.size()==0))returnnewplasmaWordIndexEntryContainer(null);// as this is a cunjunction of searches, we have no result if any word is not known