Commit 89681541 authored by reuschling's avatar reuschling
Browse files

new try


git-svn-id: https://dynaq.opendfki.de/repos/application/trunk@1060 8b50620d-ddf8-0310-9f5d-8b2f31fd9ac4
parent d8e4df57
......@@ -307,6 +307,25 @@ public class DynaQResultList implements Iterable<ScoredDynaQDocument>
this.init(dynaQQuery);
}
/**
* Creates a new DynaQResultList to a given query. The search will be processed immediately during the creation process. It can be re-processed with the method
* recalculateFromQuery()
*
* @param dynaQQuery the query for searching
* @param luceneIndexSet a KafkaRCP luceneService Plugin for accessing the Lucene index
* @param bTermRelevanceExplanations true: term relevance explanation collecting enabled (weaved stuff), false otherwise
*
* @throws Exception
*/
public DynaQResultList(DynaQQuery dynaQQuery, LuceneIndexSet luceneIndexSet, boolean bTermRelevanceExplanations) throws Exception
{
m_luceneIndexSet = luceneIndexSet;
termRelevanceExplanations = bTermRelevanceExplanations;
this.init(dynaQQuery);
}
/**
......@@ -327,6 +346,28 @@ public class DynaQResultList implements Iterable<ScoredDynaQDocument>
this.init(dynaQQuery);
}
/**
* Creates a new DynaQResultList to a given query. The search will be processed immediately during the creation process. It can be re-processed with the method
* recalculateFromQuery()
*
* @param dynaQQuery the query for searching
* @param luceneIndexSet a KafkaRCP luceneService Plugin for accessing the Lucene index
* @param iTopDocs2Collect the maximum count of documents that will be collected inside the result list
* @param bTermRelevanceExplanations true: term relevance explanation collecting enabled (weaved stuff), false otherwise
*
* @throws Exception
*/
public DynaQResultList(DynaQQuery dynaQQuery, LuceneIndexSet luceneIndexSet, int iTopDocs2Collect, boolean bTermRelevanceExplanations) throws Exception
{
m_luceneIndexSet = luceneIndexSet;
termRelevanceExplanations = bTermRelevanceExplanations;
this.setTopDocs2CollectCount(iTopDocs2Collect);
this.init(dynaQQuery);
}
......
......@@ -46,8 +46,6 @@ import org.apache.lucene.search.Weight;
import org.apache.lucene.store.FSDirectory;
import org.apache.lucene.util.Version;
import de.dfki.inquisition.logging.LoggingUtils;
/**
......@@ -132,8 +130,8 @@ public class TermRelevancesCollector
// wenn für diese Query gar keine TermRelevances enabled ist, dann mache mer gar nix
if(((TermRelevancesQuery) query4Weight).isTermRelevancesEnabled() == false) return;
System.err.println("chris: " + "after search: " + query4Weight.toString());
System.err.println("chris: " + LoggingUtils.getCurrentStackTrace());
// System.err.println("chris: " + "after search: " + query4Weight.toString());
// System.err.println("chris: " + LoggingUtils.getCurrentStackTrace());
// TODO brauche ich diesen zweiten Durchlauf noch? Oder habe ich es mit dem Doppeleintrag bei afterScore erschlagen? Ich vermute es geht, wenn ich den bulkscorer
// noch geweaved habe... CHECK
......
......@@ -1653,9 +1653,9 @@ public class SimpleIndexInterface
DynaQResultList resultList;
if(iTopDocs2Collect < 0)
resultList = new DynaQResultList(dynaqQuery, m_luceneIndexSet);
resultList = new DynaQResultList(dynaqQuery, m_luceneIndexSet, false);
else
resultList = new DynaQResultList(dynaqQuery, m_luceneIndexSet, iTopDocs2Collect);
resultList = new DynaQResultList(dynaqQuery, m_luceneIndexSet, iTopDocs2Collect, false);
resultList.termRelevanceExplanations = false;
// System.err.println("chris: " + "termRelevanceExplanations set to false");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment