Author: mickw
Date: 2006-05-03 19:33:53 +0200 (Wed, 03 May 2006)
New Revision: 2852
Modified:
trunk/pom.xml
trunk/src/java/no/schibstedsok/front/searchportal/command/AbstractSearchCommand.java
trunk/src/java/no/schibstedsok/front/searchportal/query/run/RunningQueryImpl.java
Log:
SEARCH-263
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2006-05-03 15:18:41 UTC (rev 2851)
+++ trunk/pom.xml 2006-05-03 17:33:53 UTC (rev 2852)
@@ -179,7 +179,7 @@
</build>
<properties>
<sesam.site.default>localhost:8080</sesam.site.default>
-
<queryServerURL.3>http://cobraprod.bos3.fasstsearch.net:15100</queryServerURL.3>
+
<queryServerURL.3>http://cobraprod.bos3.fastsearch.net:15100</queryServerURL.3>
<queryServerURL.2>http://localhost:15200</queryServerURL.2>
<queryServerURL.1>http://localhost:15100</queryServerURL.1>
<msearch.configuration.url>http://mobile:8080/mobile/conf/msearch-client.properties</msearch.configuration.url>
@@ -202,7 +202,7 @@
</build>
<properties>
<sesam.site.default>bleedingsearch.schibstedsok.no</sesam.site.default>
-
<queryServerURL.3>http://cobraprod.bos3.fasstsearch.net:15100</queryServerURL.3>
+
<queryServerURL.3>http://cobraprod.bos3.fastsearch.net:15100</queryServerURL.3>
<tradedoubler.form.action>$$url</tradedoubler.form.action>
<tradedoubler.context.url>http://www.sesam.no</tradedoubler.context.url>
<queryServerURL.2>http://10.16.195.249:15300</queryServerURL.2>
@@ -234,7 +234,7 @@
</distributionManagement>
<properties>
<sesam.site.default>sesam.no</sesam.site.default>
-
<queryServerURL.3>http://cobraprod.bos3.fasstsearch.net:15100</queryServerURL.3>
+
<queryServerURL.3>http://cobraprod.bos3.fastsearch.net:15100</queryServerURL.3>
<tradedoubler.form.action>$$url</tradedoubler.form.action>
<tradedoubler.context.url>http://www.sesam.no</tradedoubler.context.url>
<queryServerURL.2>http://10.16.195.249:15300</queryServerURL.2>
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/command/AbstractSearchCommand.java
===================================================================
---
trunk/src/java/no/schibstedsok/front/searchportal/command/AbstractSearchCommand.java
2006-05-03 15:18:41 UTC (rev 2851)
+++
trunk/src/java/no/schibstedsok/front/searchportal/command/AbstractSearchCommand.java
2006-05-03 17:33:53 UTC (rev 2852)
@@ -159,7 +159,8 @@
MDC.put(Site.NAME_KEY, context.getSite().getName());
final String thread = Thread.currentThread().getName();
- if (getSearchConfiguration().getStatisticsName() != null) {
+ final String statName = getSearchConfiguration().getStatisticsName();
+ if (statName != null && statName.length()>0 ) {
Thread.currentThread().setName(thread + " [" +
getSearchConfiguration().getStatisticsName() + "]");
} else {
Thread.currentThread().setName(thread + " [" +
getClass().getSimpleName() + "]");
Modified:
trunk/src/java/no/schibstedsok/front/searchportal/query/run/RunningQueryImpl.java
===================================================================
---
trunk/src/java/no/schibstedsok/front/searchportal/query/run/RunningQueryImpl.java
2006-05-03 15:18:41 UTC (rev 2851)
+++
trunk/src/java/no/schibstedsok/front/searchportal/query/run/RunningQueryImpl.java
2006-05-03 17:33:53 UTC (rev 2852)
@@ -227,19 +227,19 @@
} else {
- // Optimisation. Alternate between the two web searches.
- if (isNorwegian(config) || isInternational(config)) {
- final String searchType = getSingleParameter("s");
- if (searchType != null && searchType.equals("g")) {
- if (isInternational(config)) {
-
commands.add(SearchCommandFactory.createSearchCommand(searchCmdCxt,
parameters));
- }
- } else if (isNorwegian(config)) {
-
commands.add(SearchCommandFactory.createSearchCommand(searchCmdCxt,
parameters));
- }
- } else {
+// // Optimisation. Alternate between the two web searches.
+// if (isNorwegian(config) || isInternational(config)) {
+// final String searchType = getSingleParameter("s");
+// if (searchType != null && searchType.equals("g")) {
+// if (isInternational(config)) {
+//
commands.add(SearchCommandFactory.createSearchCommand(searchCmdCxt,
parameters));
+// }
+// } else if (isNorwegian(config)) {
+//
commands.add(SearchCommandFactory.createSearchCommand(searchCmdCxt,
parameters));
+// }
+// } else {
commands.add(SearchCommandFactory.createSearchCommand(searchCmdCxt,
parameters));
- }
+// }
}
}
@@ -265,18 +265,20 @@
final SearchResult searchResult = task.get();
if (searchResult != null) {
- // Information we need
+ // Information we need about and for the enrichment
final SearchConfiguration config =
searchResult.getSearchCommand().getSearchConfiguration();
final String name = config.getName();
final SearchTab.EnrichmentHint eHint =
context.getSearchTab().getEnrichmentByCommand(name);
- final Integer score = scores.get(name);
+ final int score = scores.get(name) != null
+ ? (int)(scores.get(name) * eHint.getWeight())
+ : 0;
// update hit status
hitsToShow |= searchResult.getHitCount() > 0;
hits.put(name, searchResult.getHitCount());
// score
- if( eHint != null && score != null &&
searchResult.getResults().size() > 0
+ if( eHint != null && searchResult.getResults().size()
> 0
&& score >= eHint.getThreshold() && score >
15) {
// add enrichment
_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits