Author: ssmiweve
Date: 2008-04-08 10:12:09 +0200 (Tue, 08 Apr 2008)
New Revision: 6385

Modified:
   
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/AbstractESPFastSearchCommand.java
   
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
Log:
SEARCH-4470 - Scanpix search times out when the query is an url

Modified: 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/AbstractESPFastSearchCommand.java
===================================================================
--- 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/AbstractESPFastSearchCommand.java
        2008-04-08 08:04:38 UTC (rev 6384)
+++ 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/AbstractESPFastSearchCommand.java
        2008-04-08 08:12:09 UTC (rev 6385)
@@ -40,6 +40,7 @@
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.OrClause;
+import no.sesat.search.query.UrlClause;
 import no.sesat.search.query.Visitor;
 import no.sesat.search.query.XorClause;
 import no.sesat.search.result.BasicResultList;
@@ -86,7 +87,6 @@
     private static final Logger LOG = 
Logger.getLogger(AbstractESPFastSearchCommand.class);
     private static final String ERR_CALL_SET_VIEW = "setView() must be called 
prior to calling this method";
 
-
     private enum ReservedWord {
         AND("and"),
         OR("or"),
@@ -422,6 +422,16 @@
     }
 
     /**
+     * Adds quotes around the URL and replacing the '?'. Failing so will 
produce syntax error in filter.
+     *
+     * @param clause The url clause.
+     */
+    protected void visitImpl(final UrlClause clause) {
+
+        appendToQueryRepresentation('\"' + 
getTransformedTerm(clause).replace("?", " ") + '\"');
+    }
+
+    /**
      * @param clause The clause to examine.
      */
     @Override

Modified: 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
===================================================================
--- 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
        2008-04-08 08:04:38 UTC (rev 6384)
+++ 
branches/2.17/generic.sesam/search-command-control/fast/src/main/java/no/sesat/search/mode/command/NewsEspSearchCommand.java
        2008-04-08 08:12:09 UTC (rev 6385)
@@ -313,21 +313,6 @@
         addMedium(clause);
     }
 
-    /**
-     * Adds quotes around the URL and replacing the '?'. Failing so will 
produce syntax error in filter.
-     *
-     * @param clause The url clause.
-     */
-    protected void visitImpl(final UrlClause clause) {
-
-        LOG.debug("Visiting me with: " + clause
-            + ", isroot=" + (getQuery().getRootClause() == clause)
-            + ", rootClause=" + getQuery().getRootClause());
-
-        // Modifies the query so url searches works.
-        appendToQueryRepresentation('"' + 
getTransformedTerm(clause).replace("?", " ") + '"');
-    }
-
     @Override
     public NewsEspCommandConfig getSearchConfiguration() {
         return (NewsEspCommandConfig) super.getSearchConfiguration();

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to