Author: ssmiweve Date: 2009-09-13 16:52:54 +0200 (Sun, 13 Sep 2009) New Revision: 7281
Added: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractRestfulSearchConfiguration.java branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooBossCommandConfig.java branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/YahooBossSearchCommand.java Modified: branches/2.18/generic.sesam/pom.xml branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractXmlSearchConfiguration.java branches/2.18/generic.sesam/sesam.com/war/src/main/conf/modes.xml branches/2.18/generic.sesam/sesam.com/war/src/main/images/logo.png branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/footer.jsp branches/2.18/generic.sesam/war/src/main/conf/configuration.properties branches/2.18/generic.sesam/war/src/main/conf/modes.xml branches/2.18/generic.sesam/war/src/webapp/WEB-INF/web.xml Log: Implement searches using Yahoo! Boss Make sesam.com use it. Modified: branches/2.18/generic.sesam/pom.xml =================================================================== --- branches/2.18/generic.sesam/pom.xml 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/pom.xml 2009-09-13 14:52:54 UTC (rev 7281) @@ -458,7 +458,14 @@ </profiles> <dependencies> + <!-- Anything that bundles with Sesat-Kernel's ROOT.war should be scope=provided in skins. --> <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-solrj</artifactId> + <scope>provided</scope> + </dependency> + <!-- Same goes for our own sesat-kernel artifact already bundled in ROOT.war --> + <dependency> <groupId>sesat</groupId> <artifactId>sesat-site-spi</artifactId> <version>2.18-SNAPSHOT</version> @@ -481,6 +488,7 @@ <artifactId>commons-ioc</artifactId> <scope>provided</scope> </dependency> + <!-- Other dependencies --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> @@ -556,6 +564,7 @@ <dependencyManagement> <dependencies> + <!-- FAST libraries need to be manually put into classpath, if needed --> <dependency> <groupId>fast</groupId> <artifactId>dsapi</artifactId> Added: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractRestfulSearchConfiguration.java =================================================================== --- branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractRestfulSearchConfiguration.java (rev 0) +++ branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractRestfulSearchConfiguration.java 2009-09-13 14:52:54 UTC (rev 7281) @@ -0,0 +1,142 @@ +/* Copyright (2006-2009) Schibsted ASA + * This file is part of SESAT. + * + * SESAT is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SESAT is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with SESAT. If not, see <http://www.gnu.org/licenses/>. + * AbstractXmlSearchConfiguration.java + * + * Created on June 12, 2006, 10:58 AM + * + */ + +package no.sesat.search.mode.config; + +/** + * + * + * @version $Id$ + */ +public abstract class AbstractRestfulSearchConfiguration extends CommandConfig { + + + // Constants ----------------------------------------------------- + + // Attributes ---------------------------------------------------- + + /** + * Holds value of property key for host. + */ + private String host = ""; + + /** + * Holds value of property encoding. + */ + private String encoding = ""; + + /** + * Holds value of property key for port. + */ + private String port = ""; + + // Static -------------------------------------------------------- + + // Constructors -------------------------------------------------- + + // Public -------------------------------------------------------- + + /** + * Getter for property host. + * @return Value of property host. + */ + public String getHost() { + return this.host; + } + + /** + * Setter for property host. + * @param host New value of property host. + */ + public void setHost(final String host) { + this.host = host; + } + + + + /** + * Getter for property encoding. + * @return Value of property encoding. + */ + public String getEncoding() { + return this.encoding; + } + + /** + * Setter for property encoding. + * @param encoding New value of property encoding. + */ + public void setEncoding(final String encoding) { + this.encoding = encoding; + } + + + + /** + * Getter for property port. + * @return Value of property port. + */ + public String getPort() { + return this.port; + } + + /** + * Setter for property port. + * @param port New value of property port. + */ + public void setPort(final String port) { + this.port = port; + } + + /** + * Holds value of property hostHeader. + */ + private String hostHeader = ""; + + /** + * Getter for property hostHeader. + * @return Value of property hostHeader. + */ + public String getHostHeader() { + return this.hostHeader; + } + + /** + * Setter for property hostHeader. + * @param hostHeader New value of property hostHeader. + */ + public void setHostHeader(String hostHeader) { + this.hostHeader = hostHeader; + } + + // Z implementation ---------------------------------------------- + + // Y overrides --------------------------------------------------- + + // Package protected --------------------------------------------- + + // Protected ----------------------------------------------------- + + // Private ------------------------------------------------------- + + // Inner classes ------------------------------------------------- + +} Property changes on: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractRestfulSearchConfiguration.java ___________________________________________________________________ Added: svn:keywords + Id Modified: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractXmlSearchConfiguration.java =================================================================== --- branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractXmlSearchConfiguration.java 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/AbstractXmlSearchConfiguration.java 2009-09-13 14:52:54 UTC (rev 7281) @@ -1,4 +1,4 @@ -/* Copyright (2006-2008) Schibsted ASA +/* Copyright (2006-2009) Schibsted ASA * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -21,117 +21,24 @@ package no.sesat.search.mode.config; -import no.sesat.search.mode.SearchModeFactory.Context; -import no.sesat.search.site.config.AbstractDocumentFactory; -import no.sesat.search.site.config.AbstractDocumentFactory.ParseType; -import org.w3c.dom.Element; - /** * * * @version $Id$ */ -public abstract class AbstractXmlSearchConfiguration extends CommandConfig { +public abstract class AbstractXmlSearchConfiguration extends AbstractRestfulSearchConfiguration { // Constants ----------------------------------------------------- // Attributes ---------------------------------------------------- - /** - * Holds value of property key for host. - */ - private String host = ""; - - /** - * Holds value of property encoding. - */ - private String encoding = ""; - - /** - * Holds value of property key for port. - */ - private String port = ""; - // Static -------------------------------------------------------- // Constructors -------------------------------------------------- // Public -------------------------------------------------------- - /** - * Getter for property host. - * @return Value of property host. - */ - public String getHost() { - return this.host; - } - - /** - * Setter for property host. - * @param host New value of property host. - */ - public void setHost(final String host) { - this.host = host; - } - - - - /** - * Getter for property encoding. - * @return Value of property encoding. - */ - public String getEncoding() { - return this.encoding; - } - - /** - * Setter for property encoding. - * @param encoding New value of property encoding. - */ - public void setEncoding(final String encoding) { - this.encoding = encoding; - } - - - - /** - * Getter for property port. - * @return Value of property port. - */ - public String getPort() { - return this.port; - } - - /** - * Setter for property port. - * @param port New value of property port. - */ - public void setPort(final String port) { - this.port = port; - } - - /** - * Holds value of property hostHeader. - */ - private String hostHeader = ""; - - /** - * Getter for property hostHeader. - * @return Value of property hostHeader. - */ - public String getHostHeader() { - return this.hostHeader; - } - - /** - * Setter for property hostHeader. - * @param hostHeader New value of property hostHeader. - */ - public void setHostHeader(String hostHeader) { - this.hostHeader = hostHeader; - } - // Z implementation ---------------------------------------------- // Y overrides --------------------------------------------------- Added: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooBossCommandConfig.java =================================================================== --- branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooBossCommandConfig.java (rev 0) +++ branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooBossCommandConfig.java 2009-09-13 14:52:54 UTC (rev 7281) @@ -0,0 +1,168 @@ +/* Copyright (2006-2009) Schibsted ASA + * This file is part of SESAT. + * + * SESAT is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SESAT is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with SESAT. If not, see <http://www.gnu.org/licenses/>. + + */ +package no.sesat.search.mode.config; + +import no.sesat.search.mode.SearchModeFactory.Context; +import no.sesat.search.mode.config.CommandConfig.Controller; +import org.w3c.dom.Element; + +/** + * Search against Yahoo! BOSS. + * http://developer.yahoo.com/search/boss + * + * @version <tt>$Id$</tt> + */ +...@controller("YahooBossSearchCommand") +public class YahooBossCommandConfig extends AbstractYahooSearchConfiguration { + + private String appid = "CXi9AK3V34Fgem_y.Rw988JmMF58pKEeeYc3lpzUm8lZY6IxaKMwNL1c4MaSq.bTU1eb"; + + /** + * Holds value of property region. + */ + private String region; + + /** + * Getter for property region. + * @return Value of property region. + */ + public String getRegion() { + return this.region; + } + + /** + * Setter for property region. + * Available values written in http://developer.yahoo.com/search/countries.html + * @param country New value of property country. + */ + public void setRegion(final String region) { + this.region = region; + } + + /** + * Getter for property appid. + * @return Value of property appid. + */ + public String getAppid() { + return appid; + } + + /** + * Setter for property appid. + * + * This value will be propagated to setPartnerId(..) in readSearchConfigurationAfter. + * + * Apply for a application ID here http://developer.yahoo.com/faq/index.html#appid + * @param appid New value of property appid. + */ + public void setAppid(final String appid) { + this.appid = appid; + } + + /** + * Holds value of property language. + */ + private String language = "en"; + + /** + * Getter for property language. + * @return Value of property language. + */ + public String getLanguage() { + return this.language; + } + + /** + * Setter for property language. + * see supported languages http://developer.yahoo.com/search/languages.html + * @param language New value of property language. + */ + public void setLanguage(final String language) { + this.language = language; + } + + /** + * Holds value of property site. + */ + private String site; + + /** + * Getter for property site. + * @return Value of property site. + */ + public String getSite() { + return this.site; + } + + /** + * Setter for property site. + * @param site New value of property site. + */ + public void setSite(final String site) { + this.site = site; + } + + /** + * Holds value of property format. + */ + private String format = "xml"; + + /** + * Getter for property format. + * @return Value of property format. + */ + public String getFormat() { + return this.format; + } + + /** + * Setter for property format. + * @param format New value of property format. + */ + public void setFormat(final String format) { + this.format = format; + } + + /** + * Holds value of property adult. + */ + private boolean adult = false; + + /** + * Getter for property adult. + * @return Value of property adult. + */ + public boolean getAdult() { + return this.adult; + } + + /** + * Setter for property adult. + * @param adult New value of property adult. + */ + public void setAdult(final boolean adult) { + this.adult = adult; + } + + @Override + public SearchConfiguration readSearchConfiguration(final Element element, final SearchConfiguration inherit, Context context) { + super.readSearchConfiguration(element, inherit, context); + setPartnerId(getAppid()); + return this; + } +} Property changes on: branches/2.18/generic.sesam/search-command-config/src/main/java/no/sesat/search/mode/config/YahooBossCommandConfig.java ___________________________________________________________________ Added: svn:keywords + Id Added: branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/YahooBossSearchCommand.java =================================================================== --- branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/YahooBossSearchCommand.java (rev 0) +++ branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/YahooBossSearchCommand.java 2009-09-13 14:52:54 UTC (rev 7281) @@ -0,0 +1,220 @@ +/* + * Copyright (2008-2009) Schibsted ASA + * This file is part of SESAT. + * + * SESAT is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * SESAT is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with SESAT. If not, see <http://www.gnu.org/licenses/>. + + */ +package no.sesat.search.mode.command; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.SocketTimeoutException; +import java.net.URLEncoder; +import java.text.MessageFormat; +import java.util.Map; +import no.sesat.search.mode.config.YahooBossCommandConfig; +import no.sesat.search.result.BasicResultList; +import no.sesat.search.result.BasicResultItem; +import no.sesat.search.result.ResultItem; +import no.sesat.search.result.ResultList; +import org.apache.log4j.Logger; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +/** @see YahooBossCommandConfig + * + * + * @version $Id$ + */ +public class YahooBossSearchCommand extends AbstractYahooSearchCommand { + + // Constants ----------------------------------------------------- + + private static final Logger LOG = Logger.getLogger(YahooBossSearchCommand.class); + private static final String ERR_FAILED_CREATING_URL = "Failed to create command url"; + + private static final String COMMAND_URL_PATTERN = + "/ysearch/web/v1/{1}?appid={0}®ion={2}&count={3}&start={4}&format={5}&{6}lang={7}&{8}"; + + private static final String TOTALHITS_ATTRIBUTE ="totalhits"; + private static final String RESULTSET_ELEMENT = "resultset_web"; + private static final String RESULT_ELEMENT = "result"; + + // Attributes ---------------------------------------------------- + + // Static -------------------------------------------------------- + + // Constructors -------------------------------------------------- + + /** + * Create new command. + * + * @param cxt The context to execute in. + */ + public YahooBossSearchCommand(final Context cxt) { + + super(cxt); + + setXmlRestful( + new AbstractXmlRestful(cxt) { + @Override + public String createRequestURL() { + + final YahooBossCommandConfig conf = YahooBossSearchCommand.this.getSearchConfiguration(); + + final String wrappedTransformedQuery = YahooBossSearchCommand.this.getTransformedQuery() + + ' ' + YahooBossSearchCommand.this.getFilter(); + + final String site = null != conf.getSite() + ? "site=" + conf.getSite() + : null != cxt.getDataModel().getParameters().getValue("site") + ? "site=" + cxt.getDataModel().getParameters().getValue("site").getUtf8UrlEncoded() + : ""; + + try { + return MessageFormat.format( + COMMAND_URL_PATTERN, + conf.getAppid(), + URLEncoder.encode(wrappedTransformedQuery, "UTF-8"), + conf.getRegion(), + conf.getResultsToReturn(), + YahooBossSearchCommand.this.getOffset(), + conf.getFormat(), + !conf.getAdult() ? "filter=-porn&" : "", + conf.getLanguage(), + site); + + } catch (UnsupportedEncodingException ex) { + throw new SearchCommandException(ERR_FAILED_CREATING_URL, ex); + } + } + }); + } + + // Public -------------------------------------------------------- + + @Override + public ResultList<ResultItem> execute() { + + try { + + final ResultList<ResultItem> searchResult = new BasicResultList<ResultItem>(); + + if(getTransformedQuery().trim().length() > 0 + || getFilter().trim().length() > 0 + || "*".equals(getQuery().getQueryString())){ + + final Document doc = getXmlRestful().getXmlResult(); + + if (doc != null) { + final Element searchResponseE = (Element) doc.getDocumentElement() + .getElementsByTagName(RESULTSET_ELEMENT).item(0); + + final String totalHitsStr = searchResponseE.getAttribute(TOTALHITS_ATTRIBUTE); + + int totalHits; + try { + totalHits = Integer.parseInt(totalHitsStr); + }catch(NumberFormatException e) { + totalHits = Integer.MAX_VALUE; + } + searchResult.setHitCount(totalHits); + + // build results + final NodeList list = searchResponseE.getElementsByTagName(RESULT_ELEMENT); + for (int i = 0; i < list.getLength(); ++i) { + final Element listing = (Element) list.item(i); + final BasicResultItem item = createItem(listing); + searchResult.addResult(item); + } + } + } + return searchResult; + + } catch (SocketTimeoutException ste) { + LOG.error(getSearchConfiguration().getId() + " --> " + ste.getMessage()); + return new BasicResultList<ResultItem>(); + + } catch (IOException e) { + throw new SearchCommandException(e); + + } catch (SAXException e) { + throw new SearchCommandException(e); + } + } + + /** Assured that associated SearchConfiguration is always of this type. **/ + @Override + public YahooBossCommandConfig getSearchConfiguration() { + return (YahooBossCommandConfig)super.getSearchConfiguration(); + } + + @Override + public String getTransformedQuery() { + final String tq = super.getTransformedQuery(); + if(tq == null) { + LOG.debug("transformedQuery is null, using \"\""); + return ""; + } + return tq; + } + + + // Package protected --------------------------------------------- + + // Protected ----------------------------------------------------- + + /** + * + * @param result + * @return + */ + @Override + protected BasicResultItem createItem(final Element result) { + + final BasicResultItem item = new BasicResultItem(); + + for (final Map.Entry<String,String> entry : getSearchConfiguration().getResultFieldMap().entrySet()){ + + final Element fieldE = (Element) result.getElementsByTagName(entry.getKey()).item(0); + if(null != fieldE && fieldE.getChildNodes().getLength() >0){ + item.addField(entry.getValue(), fieldE.getFirstChild().getNodeValue()); + } + } + + return item; + } + + @Override + protected String getFilter() { + return super.getFilter(); + } + + @Override + protected int getOffset() { + return super.getOffset(); + } + + @Override + protected String getParameter(String paramName) { + return super.getParameter(paramName); + } + + // Private ------------------------------------------------------- + + // Inner classes ------------------------------------------------- +} Property changes on: branches/2.18/generic.sesam/search-command-control/default/src/main/java/no/sesat/search/mode/command/YahooBossSearchCommand.java ___________________________________________________________________ Added: svn:keywords + Id Modified: branches/2.18/generic.sesam/sesam.com/war/src/main/conf/modes.xml =================================================================== --- branches/2.18/generic.sesam/sesam.com/war/src/main/conf/modes.xml 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/sesam.com/war/src/main/conf/modes.xml 2009-09-13 14:52:54 UTC (rev 7281) @@ -47,10 +47,11 @@ </mode> - <mode id="international" inherit="default-mode"> + <mode id="international" inherit="default-mode" evaluation="false"> - <yahoo-idp-command id="globalSearch" inherit="default-yahoo-idp-command"/> + <!--yahoo-idp-command id="globalSearch" inherit="default-yahoo-idp-command"/--> <!--yahoo-web-command id="globalSearch" inherit="default-yahoo-web-command"/--> + <yahoo-boss-command id="globalSearch" inherit="default-yahoo-boss-command"/> <!--solr-command id="globalSearch" inherit="default-command" result-fields="list_name AS title,list_entry AS body" Modified: branches/2.18/generic.sesam/sesam.com/war/src/main/images/logo.png =================================================================== (Binary files differ) Modified: branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/footer.jsp =================================================================== --- branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/footer.jsp 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/sesam.com/war/src/main/webapp/WEB-INF/classes/fragments/layout/sesam.com/footer.jsp 2009-09-13 14:52:54 UTC (rev 7281) @@ -4,7 +4,7 @@ xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:search="urn:jsptld:/WEB-INF/SearchPortal.tld"><!-- XXX a little awkward since SearchPortal.tld never exists in the skin --> <!-- - * Copyright (2008) Schibsted ASA + * Copyright (2008-2009) Schibsted ASA * This file is part of SESAT. * * SESAT is free software: you can redistribute it and/or modify @@ -24,7 +24,7 @@ Version : $Id$ --> <div id="footer_help"> - <jsp:text><![CDATA[<div id="copyright">©2008</div>]]></jsp:text> + <jsp:text><![CDATA[<div id="copyright">©2008-2009</div>]]></jsp:text> <div id="builtWithSesat"><search:text key="builtWithSesat"/></div> <div id="resultsFromYahoo"><search:text key="resultsFromYahoo"/></div> </div> Modified: branches/2.18/generic.sesam/war/src/main/conf/configuration.properties =================================================================== --- branches/2.18/generic.sesam/war/src/main/conf/configuration.properties 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/war/src/main/conf/configuration.properties 2009-09-13 14:52:54 UTC (rev 7281) @@ -44,6 +44,8 @@ # Yahoo Free and Public Web Service (see YahooWebSearchCommand) yahooWebHost=search.yahooapis.com yahooWebPort=80 +yahooBossHost=boss.yahooapis.com +yahooBossPort=80 # This connection is restricted just for Schibsted S\u00F8k AS. # It is a paid service so others must contact yahoo for their own details (paid or demo) and override the following. Modified: branches/2.18/generic.sesam/war/src/main/conf/modes.xml =================================================================== --- branches/2.18/generic.sesam/war/src/main/conf/modes.xml 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/war/src/main/conf/modes.xml 2009-09-13 14:52:54 UTC (rev 7281) @@ -225,25 +225,12 @@ </query-transformers> </stock-command> - <!-- TODO rename to more appropriate. only sweden uses it. --> - <yahoo-idp-command id="default-web-command" inherit="default-yahoo-command"> - - <query-transformers> - <token-mask position="prefix" - predicates="WIKIPEDIA_MAGIC,CATALOGUE_MAGIC,YELLOW_MAGIC,WHITE_MAGIC,PICTURE_MAGIC,NEWS_MAGIC"/> - </query-transformers> - </yahoo-idp-command> - - <!-- TODO rename to more appropriate. only sweden uses it. --> - <yahoo-idp-command id="default-web-counter-only" results-to-return="0" inherit="default-web-command"/> - - <yahoo-web-command id="default-yahoo-web-command" - appid="YahooDemo" + <yahoo-boss-command id="default-yahoo-boss-command" field-filters="site" - host="yahooWebHost" + host="yahooBossHost" language="en" - port="yahooWebPort" - result-fields="Title AS title,Summary AS body,Url AS url,ClickUrl AS clickurl" + port="yahooBossPort" + result-fields="title,abstract AS body,url,clickurl" results-to-return="10" inherit="default-command"> <query-builder> @@ -253,7 +240,7 @@ <field-chooser target="title" fields="title,url"/> <regexp field="url" target="site" regexp="http://([^/]*)/?"/> </result-handlers> - </yahoo-web-command> + </yahoo-boss-command> <youtube-command id="default-youtube-command" inherit="default-command" Modified: branches/2.18/generic.sesam/war/src/webapp/WEB-INF/web.xml =================================================================== --- branches/2.18/generic.sesam/war/src/webapp/WEB-INF/web.xml 2009-09-13 14:46:50 UTC (rev 7280) +++ branches/2.18/generic.sesam/war/src/webapp/WEB-INF/web.xml 2009-09-13 14:52:54 UTC (rev 7281) @@ -21,7 +21,7 @@ <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <description>Handles serving of configuration files.</description> - <display-name>Schibsted Søk Configuration</display-name> + <display-name>Sesat's default base Configuration</display-name> <servlet> <servlet-name>Log</servlet-name> @@ -38,7 +38,8 @@ <servlet-class>no.sesat.commons.resourcefeed.ResourceServlet</servlet-class> <init-param> <param-name>ipaddresses.allowed</param-name> - <param-value>80.91.33.,193.90.148.58</param-value> + <!-- By default allow everybody to read the private resources (generic.sesam is open sourced afterall) --> + <param-value>0,1,2,3,4,5,6,7,8,9</param-value> </init-param> <init-param> <param-name>resources.restricted</param-name> _______________________________________________ Kernel-commits mailing list Kernel-commits@sesat.no http://sesat.no/mailman/listinfo/kernel-commits