Apache Nutch is an extensible and scalable web crawler
NUTCH-2684: Outdated documentation.
r0ann3ldd067c5c8a94
diff --git a/src/plugin/indexer-cloudsearch/README.md b/src/plugin/indexer-cloudsearch/README.mdindex 8669682eb..ddef69342 100644--- a/src/plugin/indexer-cloudsearch/README.md+++ b/src/plugin/indexer-cloudsearch/README.md@@ -3,27 +3,41 @@ AWS CloudSearch plugin for NutchSee [http://aws.amazon.com/cloudsearch/] for information on AWS CloudSearch.-Steps to use :+**indexer-cloudsearch plugin** is used for sending documents from one or more segments to Amazon CloudSearch. The configuration for the index writers is on **conf/index-writers.xml** file, included in the official Nutch distribution and it's as follow:-From runtime/local/bin+```xml+<writer id="<writer_id>" class="org.apache.nutch.indexwriter.cloudsearch.CloudSearchIndexWriter">+ <mapping>+ ...+ </mapping>+ <parameters>+ ...+ </parameters>+</writer>+```-* Configure the AWS credentials+Each `<writer>` element has two mandatory attributes:-Edit `~/.aws/credentials`, see [http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html] for details. Note that this should not be necessary when running Nutch on EC2.+* `<writer_id>` is a unique identification for each configuration. This feature allows Nutch to distinguish each configuration, even when they are for the same index writer. In addition, it allows to have multiple instances for the same index writer, but with different configurations.-* Edit ../conf/nutch-site.xml and check that 'plugin.includes' contains 'indexer-cloudsearch'.+* `org.apache.nutch.indexwriter.cloudsearch.CloudSearchIndexWriter` corresponds to the canonical name of the class that implements the IndexWriter extension point. This value should not be modified for the **indexer-cloudsearch plugin**.-* (Optional) Test the indexing+## Mapping-`./nutch indexchecker -D doIndex=true -D cloudsearch.batch.dump=true "http://nutch.apache.org/"`+The mapping section is explained [here](https://wiki.apache.org/nutch/IndexWriters#Mapping_section). The structure of this section is general for all index writers.-if the agent name hasn't been configured in nutch-site.xml, it can be added on the command line with `-D http.agent.name=whateverValueDescribesYouBest`+## Parameters-you should see the fields extracted for the indexing coming up on the console.+Each parameter has the form `<param name="<name>" value="<value>"/>` and the parameters for this index writer are:-Using the `cloudsearch.batch.dump` parameter allows to dump the batch to the local temp dir. The files has the prefix "CloudSearch_" e.g. `/tmp/CloudSearch_4822180575734804454.json`. This temp file can be used as a template when defining the fields in the domain creation (see below).+Parameter Name | Description | Default value+--|--|--+endpoint | Endpoint where service requests should be submitted. |+region | Region name. |+batch.dump | **true** to store the JSON representation of the documents to a local temp dir. The files has the prefix "CloudSearch_" e.g. `/tmp/CloudSearch_4822180575734804454.json`. This temp file can be used as a template when defining the fields in the domain creation. | false+batch.maxSize | Maximum number of documents to send as a batch to CloudSearch. | -1-* Create a CloudSearch domain+## Create a CloudSearch domainThis can be done using the web console [https://eu-west-1.console.aws.amazon.com/cloudsearch/home?region=eu-west-1#]. You can use the temp file generated above to bootstrap the field definition.@@ -31,28 +45,14 @@ You can also create the domain using the AWS CLI [http://docs.aws.amazon.com/cloNote that the creation of the domain can take some time. Once it is complete, note the document endpoint, or alternatively verify the region and domain name.-* Edit ../conf/nutch-site.xml and add `cloudsearch.endpoint` and `cloudsearch.region`.+> The CloudSearchIndexWriter will log any errors while sending the batches to CloudSearch and will resume the process without breaking. This means that you might not get all the documents in the index. You should check the log files for errors. Using small batch sizes will limit the number of documents skipped in case of error.-* Re-test the indexing+> Any fields not defined in the CloudSearch domain will be ignored by the CloudSearchIndexWriter. Again, the logs will contain a trace of any field names skipped.-`./nutch indexchecker -D doIndex=true "http://nutch.apache.org/"`-and check in the CloudSearch console that the document has been succesfully indexed.-Additional parameters-* `cloudsearch.batch.maxSize` \: can be used to limit the size of the batches sent to CloudSearch to N documents. Note that the default limitations still apply.-* `cloudsearch.batch.dump` \: see above. Stores the JSON representation of the document batch in the local temp dir, useful for bootstrapping the index definition.-Note--The CloudSearchIndexWriter will log any errors while sending the batches to CloudSearch and will resume the process without breaking. This means that you might not get all the documents in the index. You should check the log files for errors. Using small batch sizes will limit the number of documents skipped in case of error.--Any fields not defined in the CloudSearch domain will be ignored by the CloudSearchIndexWriter. Again, the logs will contain a trace of any field names skipped.----