Author: sshafroi Date: 2008-07-01 12:12:26 +0200 (Tue, 01 Jul 2008) New Revision: 6716
Modified: trunk/ trunk/httpclient-api/src/main/java/no/sesat/search/http/HTTPClient.java trunk/query-api/src/main/java/no/sesat/search/query/token/JepTokenEvaluator.java trunk/site-spi/src/main/java/no/sesat/search/site/config/Spi.java trunk/sitemap-generator/ Log: Merged revisions 6685-6713,6715 via svnmerge from http://sesat.no/svn/sesat-kernel/branches/2.17 ........ r6686 | sshafroi | 2008-06-12 11:44:04 +0200 (Thu, 12 Jun 2008) | 5 lines SEARCH-4859 - S?\195?\184k p?\195?\165 telefonnummer gir kalkulator, ikke berikelse I will do a regexp search now to see if the query matches "[0-9.]+". If it does then set the result to null instead of parsing and evaluating it. ........ r6696 | ssenrogn | 2008-06-17 10:24:31 +0200 (Tue, 17 Jun 2008) | 1 line Added Eclipse files to the svn ignore list. ........ r6703 | ssmiweve | 2008-06-17 12:19:33 +0200 (Tue, 17 Jun 2008) | 1 line http://permalink.gmane.org/gmane.comp.java.sesat.kernel.devel/119 ........ r6707 | ssmiweve | 2008-06-20 19:52:59 +0200 (Fri, 20 Jun 2008) | 1 line (OPS-204) little extra info, the url, in interceptIOException ........ r6708 | ssmiweve | 2008-06-20 20:02:45 +0200 (Fri, 20 Jun 2008) | 1 line (OPS-204) little extra info, the IOException's message, in interceptIOException ........ Property changes on: trunk ___________________________________________________________________ Name: svnmerge-integrated - /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6499 /branches/2.17:1-6684 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 + /branches/2.10:1-4690,4692-4745 /branches/2.11:1-4933 /branches/2.12:1-5051,5053-5106 /branches/2.13:1-5378 /branches/2.14:1-5508 /branches/2.15:1-5995 /branches/2.16:1-6499 /branches/2.17:1-6713,6715 /branches/2.6:1-3877 /branches/2.7:1-4160 /branches/2.8:1-4446 /branches/2.9:1-4626 /branches/MAP_SEARCHv2:1-4544 Modified: trunk/httpclient-api/src/main/java/no/sesat/search/http/HTTPClient.java =================================================================== --- trunk/httpclient-api/src/main/java/no/sesat/search/http/HTTPClient.java 2008-06-30 18:46:57 UTC (rev 6715) +++ trunk/httpclient-api/src/main/java/no/sesat/search/http/HTTPClient.java 2008-07-01 10:12:26 UTC (rev 6716) @@ -1,4 +1,4 @@ -/* Copyright (2006-2007) Schibsted Søk AS +/* Copyright (2006-2008) Schibsted Søk AS * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -401,7 +401,9 @@ cleanErrorStream((HttpURLConnection) urlConn); } - LOG.error("IOException occured for server at: " + id); + LOG.error("IOException occured for server at: " + id + " (" + + urlConn.getURL() + ") [" + + ioe.getMessage() + ']'); return ioe; } Modified: trunk/query-api/src/main/java/no/sesat/search/query/token/JepTokenEvaluator.java =================================================================== --- trunk/query-api/src/main/java/no/sesat/search/query/token/JepTokenEvaluator.java 2008-06-30 18:46:57 UTC (rev 6715) +++ trunk/query-api/src/main/java/no/sesat/search/query/token/JepTokenEvaluator.java 2008-07-01 10:12:26 UTC (rev 6716) @@ -1,4 +1,4 @@ -/* Copyright (2005-2007) Schibsted Søk AS +/* Copyright (2005-2008) Schibsted Søk AS * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -46,23 +46,27 @@ // Constructors -------------------------------------------------- /** - * Creates a new instance of JepTokenEvaluator + * Creates a new instance of JepTokenEvaluator and evaluate the query. */ public JepTokenEvaluator(final String query) { + if (query.matches("[0-9.]+")) { + result = null; // If the query is just a number don't evaluate it. + } + else { + final JEP parser = new JEP(); - final JEP parser = new JEP(); + parser.addStandardConstants(); + parser.addStandardFunctions(); + parser.addComplex(); + // parser.setImplicitMul(true); - parser.addStandardConstants(); - parser.addStandardFunctions(); - parser.addComplex(); -// parser.setImplicitMul(true); + parser.parseExpression(query); + result = parser.getComplexValue(); + } + } - parser.parseExpression(query); - result = parser.getComplexValue(); - } - // Public -------------------------------------------------------- public Complex getComplex() { Modified: trunk/site-spi/src/main/java/no/sesat/search/site/config/Spi.java =================================================================== --- trunk/site-spi/src/main/java/no/sesat/search/site/config/Spi.java 2008-06-30 18:46:57 UTC (rev 6715) +++ trunk/site-spi/src/main/java/no/sesat/search/site/config/Spi.java 2008-07-01 10:12:26 UTC (rev 6716) @@ -1,4 +1,4 @@ -/* Copyright (2006-2007) Schibsted Søk AS +/* Copyright (2006-2008) Schibsted Søk AS * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -53,7 +53,7 @@ /** */ SERVLET_HANDLER("servlet-handler"), /** */ - VELOCITY_DIRECTIVES("velocity-directives"); + VELOCITY_DIRECTIVES("velocity-directives", RESULT); private final Spi parent; private final String canonicalName; Property changes on: trunk/sitemap-generator ___________________________________________________________________ Name: svn:ignore - target + .project .classpath .settings .checkstyle target _______________________________________________ Kernel-commits mailing list [email protected] http://sesat.no/mailman/listinfo/kernel-commits
