fix #987 fix typo
This commit is contained in:
parent
24db739fdb
commit
6e1f1c8181
3 changed files with 8 additions and 8 deletions
|
@ -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) {
|
||||
// canonical
|
||||
if (StringUtil.isNotBlank(fessConfig.getCrawlerDocumentHtmlCannonicalXpath())) {
|
||||
if (StringUtil.isNotBlank(fessConfig.getCrawlerDocumentHtmlCanonicalXpath())) {
|
||||
final String canonicalUrl = getCanonicalUrl(responseData, document);
|
||||
if (canonicalUrl != null && !canonicalUrl.equals(responseData.getUrl())) {
|
||||
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) {
|
||||
final String canonicalUrl = getSingleNodeValue(document, fessConfig.getCrawlerDocumentHtmlCannonicalXpath(), false);
|
||||
final String canonicalUrl = getSingleNodeValue(document, fessConfig.getCrawlerDocumentHtmlCanonicalXpath(), false);
|
||||
if (StringUtil.isBlank(canonicalUrl)) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
||||
/** 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 */
|
||||
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();
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* @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>
|
||||
|
@ -5069,8 +5069,8 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
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() {
|
||||
|
|
|
@ -109,7 +109,7 @@ Title=title:string\n\
|
|||
crawler.document.html.content.xpath=//BODY
|
||||
crawler.document.html.lang.xpath=//HTML/@lang
|
||||
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.max.digest.length=200
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue