<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2017 Norconex Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<httpcollector id="Norconex Complex Collector">
#set($http = "com.norconex.collector.http")
#set($core = "com.norconex.collector.core")
#set($urlNormalizer = "${http}.url.impl.GenericURLNormalizer")
#set($filterExtension = "${core}.filter.impl.ExtensionReferenceFilter")
#set($filterRegexRef = "${core}.filter.impl.RegexReferenceFilter")
#set($committerClass = "com.norconex.committer.elasticsearch.ElasticsearchCommitter")
#set($searchUrl = "http://127.0.0.1:9200")
<progressDir>../crawlers/norconex/progress</progressDir>
<logsDir>../crawlers/norconex/logs</logsDir>
<crawlerDefaults>
<referenceFilters>
<filter class="$filterExtension" onMatch="exclude">jpg,gif,png,ico,css,js</filter>
</referenceFilters>
<urlNormalizer class="$urlNormalizer">
<normalizations>
removeFragment, lowerCaseSchemeHost, upperCaseEscapeSequence,
decodeUnreservedCharacters, removeDefaultPort, encodeNonURICharacters,
removeDotSegments
</normalizations>
</urlNormalizer>
<maxDepth>0</maxDepth>
<workDir>../crawlers/norconex/workDir</workDir>
<!-- We know we don't want to crawl the entire site, so ignore sitemap. -->
<sitemapResolverFactory ignore="true" />
</crawlerDefaults>
<crawlers>
<crawler id="Norconex Complex Test Page 1">
<startURLs>
<url>/product/collector-http-test/complex1.php</url>
</startURLs>
<committer class="$committerClass">
<nodes>$searchUrl</nodes>
<indexName>norconex</indexName>
<typeName>web</typeName>
<queueDir>../crawlers/norconex/committer-queue</queueDir>
<targetContentField>body</targetContentField>
<queueSize>100</queueSize>
<commitBatchSize>500</commitBatchSize>
</committer>
</crawler>
<crawler id="Norconex Complex Test Page 2">
<startURLs>
<url>/product/collector-http-test/complex2.php</url>
</startURLs>
<committer class="$committerClass">
<nodes>$searchUrl</nodes>
<indexName>norconex</indexName>
<typeName>web</typeName>
<queueDir>../crawlers/norconex/committer-queue</queueDir>
<targetContentField>body</targetContentField>
<queueSize>100</queueSize>
<commitBatchSize>500</commitBatchSize>
</committer>
</crawler>
</crawlers>
</httpcollector>