-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NUTCH-1928 Indexing filter of documents by the MIME type
git-svn-id: https://svn.apache.org/repos/asf/nutch/trunk@1661600 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
jorgelbg
committed
Feb 23, 2015
1 parent
b477bcb
commit c059485
Showing
11 changed files
with
499 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You 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. | ||
--> | ||
<project name="mimetype-filter" default="jar-core"> | ||
|
||
<import file="../build-plugin.xml" /> | ||
|
||
<!-- for junit test --> | ||
<mkdir dir="${build.test}/data"/> | ||
<copy todir="${build.test}/data"> | ||
<fileset dir="sample" includes="**/*.txt"/> | ||
</copy> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You 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. | ||
--> | ||
|
||
<ivy-module version="1.0"> | ||
<info organisation="org.apache.nutch" module="${ant.project.name}"> | ||
<license name="Apache 2.0"/> | ||
<ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org"/> | ||
<description> | ||
Apache Nutch | ||
</description> | ||
</info> | ||
|
||
<configurations> | ||
<include file="${nutch.root}/ivy/ivy-configurations.xml"/> | ||
</configurations> | ||
|
||
<publications> | ||
<!--get the artifact from our module name--> | ||
<artifact conf="master"/> | ||
</publications> | ||
|
||
<dependencies> | ||
</dependencies> | ||
|
||
</ivy-module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You 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. | ||
--> | ||
<plugin | ||
id="mimetype-filter" | ||
name="Filter indexed documents by the detected MIME" | ||
version="1.0.0" | ||
provider-name="nutch.org"> | ||
|
||
<runtime> | ||
<library name="mimetype-filter.jar"> | ||
<export name="*"/> | ||
</library> | ||
</runtime> | ||
|
||
<extension id="org.apache.nutch.indexer.filter" | ||
name="Nutch MIME filter" | ||
point="org.apache.nutch.indexer.IndexingFilter"> | ||
<implementation id="MimeTypeIndexingFilter" | ||
class="org.apache.nutch.indexer.filter.MimeTypeIndexingFilter"/> | ||
</extension> | ||
|
||
</plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You 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. | ||
|
||
# This filter can be configured to work in one of two modes (similar to | ||
# suffix-url-filter) | ||
|
||
# default to reject ('-'): in this mode, only documents with a mimetype that | ||
# match the ones specified in the config file will be accepted, all other | ||
# mimetypes will be rejected. | ||
|
||
# default to accept ('+'): in this mode, only documents with a mimetype | ||
# that match the ones specified in the config file will be rejected, | ||
# all other mimetypes will be accepted. | ||
|
||
# The format of this config file is one mimetype per line, with no preceding | ||
# whitespace. Order, in which suffixes are specified, doesn't matter. Blank | ||
# lines and comments (#) are allowed. | ||
# | ||
|
||
- | ||
|
||
image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You 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. | ||
|
||
# This filter can be configured to work in one of two modes (similar to | ||
# suffix-url-filter) | ||
|
||
# default to reject ('-'): in this mode, only documents with a mimetype that | ||
# match the ones specified in the config file will be accepted, all other | ||
# mimetypes will be rejected. | ||
|
||
# default to accept ('+'): in this mode, only documents with a mimetype | ||
# that match the ones specified in the config file will be rejected, | ||
# all other mimetypes will be accepted. | ||
|
||
# The format of this config file is one mimetype per line, with no preceding | ||
# whitespace. Order, in which suffixes are specified, doesn't matter. Blank | ||
# lines and comments (#) are allowed. | ||
# | ||
|
||
+ | ||
|
||
text/html |
Oops, something went wrong.