浏览代码

fix #987 fix typo

Shinsuke Sugaya 8 年之前
父节点
当前提交
6e1f1c8181

+ 2 - 2
src/main/java/org/codelibs/fess/crawler/transformer/FessXpathTransformer.java

@@ -216,7 +216,7 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
 
 
     protected void putAdditionalData(final Map<String, Object> dataMap, final ResponseData responseData, final Document document) {
     protected void putAdditionalData(final Map<String, Object> dataMap, final ResponseData responseData, final Document document) {
         // canonical
         // canonical
-        if (StringUtil.isNotBlank(fessConfig.getCrawlerDocumentHtmlCannonicalXpath())) {
+        if (StringUtil.isNotBlank(fessConfig.getCrawlerDocumentHtmlCanonicalXpath())) {
             final String canonicalUrl = getCanonicalUrl(responseData, document);
             final String canonicalUrl = getCanonicalUrl(responseData, document);
             if (canonicalUrl != null && !canonicalUrl.equals(responseData.getUrl())) {
             if (canonicalUrl != null && !canonicalUrl.equals(responseData.getUrl())) {
                 final Set<RequestData> childUrlSet = new HashSet<>();
                 final Set<RequestData> childUrlSet = new HashSet<>();
@@ -400,7 +400,7 @@ public class FessXpathTransformer extends XpathTransformer implements FessTransf
     }
     }
 
 
     protected String getCanonicalUrl(final ResponseData responseData, final Document document) {
     protected String getCanonicalUrl(final ResponseData responseData, final Document document) {
-        final String canonicalUrl = getSingleNodeValue(document, fessConfig.getCrawlerDocumentHtmlCannonicalXpath(), false);
+        final String canonicalUrl = getSingleNodeValue(document, fessConfig.getCrawlerDocumentHtmlCanonicalXpath(), false);
         if (StringUtil.isBlank(canonicalUrl)) {
         if (StringUtil.isBlank(canonicalUrl)) {
             return null;
             return null;
         }
         }

+ 5 - 5
src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java

@@ -199,7 +199,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
     String CRAWLER_DOCUMENT_HTML_DIGEST_XPATH = "crawler.document.html.digest.xpath";
     String CRAWLER_DOCUMENT_HTML_DIGEST_XPATH = "crawler.document.html.digest.xpath";
 
 
     /** The key of the configuration. e.g. //LINK[@rel='canonical']/@href */
     /** The key of the configuration. e.g. //LINK[@rel='canonical']/@href */
-    String CRAWLER_DOCUMENT_HTML_CANNONICAL_XPATH = "crawler.document.html.cannonical.xpath";
+    String CRAWLER_DOCUMENT_HTML_CANONICAL_XPATH = "crawler.document.html.canonical.xpath";
 
 
     /** The key of the configuration. e.g. noscript,script,style */
     /** The key of the configuration. e.g. noscript,script,style */
     String CRAWLER_DOCUMENT_HTML_PRUNED_TAGS = "crawler.document.html.pruned.tags";
     String CRAWLER_DOCUMENT_HTML_PRUNED_TAGS = "crawler.document.html.pruned.tags";
@@ -1654,11 +1654,11 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
     String getCrawlerDocumentHtmlDigestXpath();
     String getCrawlerDocumentHtmlDigestXpath();
 
 
     /**
     /**
-     * Get the value for the key 'crawler.document.html.cannonical.xpath'. <br>
+     * Get the value for the key 'crawler.document.html.canonical.xpath'. <br>
      * The value is, e.g. //LINK[@rel='canonical']/@href <br>
      * The value is, e.g. //LINK[@rel='canonical']/@href <br>
      * @return The value of found property. (NotNull: if not found, exception but basically no way)
      * @return The value of found property. (NotNull: if not found, exception but basically no way)
      */
      */
-    String getCrawlerDocumentHtmlCannonicalXpath();
+    String getCrawlerDocumentHtmlCanonicalXpath();
 
 
     /**
     /**
      * Get the value for the key 'crawler.document.html.pruned.tags'. <br>
      * Get the value for the key 'crawler.document.html.pruned.tags'. <br>
@@ -5069,8 +5069,8 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
             return get(FessConfig.CRAWLER_DOCUMENT_HTML_DIGEST_XPATH);
             return get(FessConfig.CRAWLER_DOCUMENT_HTML_DIGEST_XPATH);
         }
         }
 
 
-        public String getCrawlerDocumentHtmlCannonicalXpath() {
-            return get(FessConfig.CRAWLER_DOCUMENT_HTML_CANNONICAL_XPATH);
+        public String getCrawlerDocumentHtmlCanonicalXpath() {
+            return get(FessConfig.CRAWLER_DOCUMENT_HTML_CANONICAL_XPATH);
         }
         }
 
 
         public String getCrawlerDocumentHtmlPrunedTags() {
         public String getCrawlerDocumentHtmlPrunedTags() {

+ 1 - 1
src/main/resources/fess_config.properties

@@ -109,7 +109,7 @@ Title=title:string\n\
 crawler.document.html.content.xpath=//BODY
 crawler.document.html.content.xpath=//BODY
 crawler.document.html.lang.xpath=//HTML/@lang
 crawler.document.html.lang.xpath=//HTML/@lang
 crawler.document.html.digest.xpath=//META[@name='description']/@content
 crawler.document.html.digest.xpath=//META[@name='description']/@content
-crawler.document.html.cannonical.xpath=//LINK[@rel='canonical']/@href
+crawler.document.html.canonical.xpath=//LINK[@rel='canonical']/@href
 crawler.document.html.pruned.tags=noscript,script,style
 crawler.document.html.pruned.tags=noscript,script,style
 crawler.document.html.max.digest.length=200
 crawler.document.html.max.digest.length=200