nutch parsing zip files
I am using nutch 1.15 to crawl the link that contains the zip files which comprises of file1.txt, file2.txt and file3.txt.
I used the parse-zip, parse-tika plugin in nutch "plugin.includes" but it is not able to crawl the content of the text files and index it.
Parsed content returns like this,
"content" : "file1.txtnfile2.txtnfile3.txtn"
Why it is not able to get the contents of file1.txt, etc?
removed zip from regex-urlfilter.txt,
#-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|zip|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
plugin.includes in nutch-site.xml:
<property>
<name>plugin.includes</name>
<value>protocol-http|protocol-httpclient|urlfilter-regex|parse-(html|text|tika|zip|metatags)|index-(basic|anchor|metadata)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
</property>
<property>
<name>http.content.limit</name>
<value>-1</value>
</property>
Parse-plugins.xml file:
<parse-plugins>
<!-- by default if the mimeType is set to *, or
if it can't be determined, use parse-tika -->
<mimeType name="*">
<plugin id="parse-tika" />
</mimeType>
<mimeType name="application/rss+xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<mimeType name="application/x-bzip2">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-gzip">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-javascript">
<plugin id="parse-js" />
</mimeType>
<mimeType name="application/x-shockwave-flash">
<plugin id="parse-swf" />
</mimeType>
<mimeType name="application/zip">
<plugin id="parse-zip" />
</mimeType>
<mimeType name="text/html">
<plugin id="parse-html" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="parse-html" />
</mimeType>
<mimeType name="text/xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<!-- Types for parse-ext plugin: required for unit tests to pass. -->
<mimeType name="application/vnd.nutch.example.cat">
<plugin id="parse-ext" />
</mimeType>
<mimeType name="application/vnd.nutch.example.md5sum">
<plugin id="parse-ext" />
</mimeType>
<!-- alias mappings for parse-xxx names to the actual extension implementation
ids described in each plugin's plugin.xml file -->
<aliases>
<alias name="parse-tika"
extension-id="org.apache.nutch.parse.tika.TikaParser" />
<alias name="parse-ext" extension-id="ExtParser" />
<alias name="parse-html"
extension-id="org.apache.nutch.parse.html.HtmlParser" />
<alias name="parse-js" extension-id="JSParser" />
<alias name="feed"
extension-id="org.apache.nutch.parse.feed.FeedParser" />
<alias name="parse-swf"
extension-id="org.apache.nutch.parse.swf.SWFParser" />
<alias name="parse-zip"
extension-id="org.apache.nutch.parse.zip.ZipParser" />
</aliases>
</parse-plugins>
Am I missing any configuration in nutch side?
parsing nutch apache-tika
add a comment |
I am using nutch 1.15 to crawl the link that contains the zip files which comprises of file1.txt, file2.txt and file3.txt.
I used the parse-zip, parse-tika plugin in nutch "plugin.includes" but it is not able to crawl the content of the text files and index it.
Parsed content returns like this,
"content" : "file1.txtnfile2.txtnfile3.txtn"
Why it is not able to get the contents of file1.txt, etc?
removed zip from regex-urlfilter.txt,
#-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|zip|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
plugin.includes in nutch-site.xml:
<property>
<name>plugin.includes</name>
<value>protocol-http|protocol-httpclient|urlfilter-regex|parse-(html|text|tika|zip|metatags)|index-(basic|anchor|metadata)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
</property>
<property>
<name>http.content.limit</name>
<value>-1</value>
</property>
Parse-plugins.xml file:
<parse-plugins>
<!-- by default if the mimeType is set to *, or
if it can't be determined, use parse-tika -->
<mimeType name="*">
<plugin id="parse-tika" />
</mimeType>
<mimeType name="application/rss+xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<mimeType name="application/x-bzip2">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-gzip">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-javascript">
<plugin id="parse-js" />
</mimeType>
<mimeType name="application/x-shockwave-flash">
<plugin id="parse-swf" />
</mimeType>
<mimeType name="application/zip">
<plugin id="parse-zip" />
</mimeType>
<mimeType name="text/html">
<plugin id="parse-html" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="parse-html" />
</mimeType>
<mimeType name="text/xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<!-- Types for parse-ext plugin: required for unit tests to pass. -->
<mimeType name="application/vnd.nutch.example.cat">
<plugin id="parse-ext" />
</mimeType>
<mimeType name="application/vnd.nutch.example.md5sum">
<plugin id="parse-ext" />
</mimeType>
<!-- alias mappings for parse-xxx names to the actual extension implementation
ids described in each plugin's plugin.xml file -->
<aliases>
<alias name="parse-tika"
extension-id="org.apache.nutch.parse.tika.TikaParser" />
<alias name="parse-ext" extension-id="ExtParser" />
<alias name="parse-html"
extension-id="org.apache.nutch.parse.html.HtmlParser" />
<alias name="parse-js" extension-id="JSParser" />
<alias name="feed"
extension-id="org.apache.nutch.parse.feed.FeedParser" />
<alias name="parse-swf"
extension-id="org.apache.nutch.parse.swf.SWFParser" />
<alias name="parse-zip"
extension-id="org.apache.nutch.parse.zip.ZipParser" />
</aliases>
</parse-plugins>
Am I missing any configuration in nutch side?
parsing nutch apache-tika
Have you delete zip exclusion into conf/regex-urlfilter ?-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line
– Quent
Nov 23 '18 at 15:53
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44
add a comment |
I am using nutch 1.15 to crawl the link that contains the zip files which comprises of file1.txt, file2.txt and file3.txt.
I used the parse-zip, parse-tika plugin in nutch "plugin.includes" but it is not able to crawl the content of the text files and index it.
Parsed content returns like this,
"content" : "file1.txtnfile2.txtnfile3.txtn"
Why it is not able to get the contents of file1.txt, etc?
removed zip from regex-urlfilter.txt,
#-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|zip|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
plugin.includes in nutch-site.xml:
<property>
<name>plugin.includes</name>
<value>protocol-http|protocol-httpclient|urlfilter-regex|parse-(html|text|tika|zip|metatags)|index-(basic|anchor|metadata)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
</property>
<property>
<name>http.content.limit</name>
<value>-1</value>
</property>
Parse-plugins.xml file:
<parse-plugins>
<!-- by default if the mimeType is set to *, or
if it can't be determined, use parse-tika -->
<mimeType name="*">
<plugin id="parse-tika" />
</mimeType>
<mimeType name="application/rss+xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<mimeType name="application/x-bzip2">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-gzip">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-javascript">
<plugin id="parse-js" />
</mimeType>
<mimeType name="application/x-shockwave-flash">
<plugin id="parse-swf" />
</mimeType>
<mimeType name="application/zip">
<plugin id="parse-zip" />
</mimeType>
<mimeType name="text/html">
<plugin id="parse-html" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="parse-html" />
</mimeType>
<mimeType name="text/xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<!-- Types for parse-ext plugin: required for unit tests to pass. -->
<mimeType name="application/vnd.nutch.example.cat">
<plugin id="parse-ext" />
</mimeType>
<mimeType name="application/vnd.nutch.example.md5sum">
<plugin id="parse-ext" />
</mimeType>
<!-- alias mappings for parse-xxx names to the actual extension implementation
ids described in each plugin's plugin.xml file -->
<aliases>
<alias name="parse-tika"
extension-id="org.apache.nutch.parse.tika.TikaParser" />
<alias name="parse-ext" extension-id="ExtParser" />
<alias name="parse-html"
extension-id="org.apache.nutch.parse.html.HtmlParser" />
<alias name="parse-js" extension-id="JSParser" />
<alias name="feed"
extension-id="org.apache.nutch.parse.feed.FeedParser" />
<alias name="parse-swf"
extension-id="org.apache.nutch.parse.swf.SWFParser" />
<alias name="parse-zip"
extension-id="org.apache.nutch.parse.zip.ZipParser" />
</aliases>
</parse-plugins>
Am I missing any configuration in nutch side?
parsing nutch apache-tika
I am using nutch 1.15 to crawl the link that contains the zip files which comprises of file1.txt, file2.txt and file3.txt.
I used the parse-zip, parse-tika plugin in nutch "plugin.includes" but it is not able to crawl the content of the text files and index it.
Parsed content returns like this,
"content" : "file1.txtnfile2.txtnfile3.txtn"
Why it is not able to get the contents of file1.txt, etc?
removed zip from regex-urlfilter.txt,
#-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|zip|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
-(?i).(gif|jpg|png|ico|css|sit|eps|wmf|ppt|mpg|xls|gz|rpm|tgz|mov|exe|jpeg|bmp|js)$
plugin.includes in nutch-site.xml:
<property>
<name>plugin.includes</name>
<value>protocol-http|protocol-httpclient|urlfilter-regex|parse-(html|text|tika|zip|metatags)|index-(basic|anchor|metadata)|query-(basic|site|url)|response-(json|xml)|summary-basic|scoring-opic|urlnormalizer-(pass|regex|basic)|indexer-elastic</value>
</property>
<property>
<name>http.content.limit</name>
<value>-1</value>
</property>
Parse-plugins.xml file:
<parse-plugins>
<!-- by default if the mimeType is set to *, or
if it can't be determined, use parse-tika -->
<mimeType name="*">
<plugin id="parse-tika" />
</mimeType>
<mimeType name="application/rss+xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<mimeType name="application/x-bzip2">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-gzip">
<!-- try and parse it with the zip parser -->
<plugin id="parse-zip" />
</mimeType>
<mimeType name="application/x-javascript">
<plugin id="parse-js" />
</mimeType>
<mimeType name="application/x-shockwave-flash">
<plugin id="parse-swf" />
</mimeType>
<mimeType name="application/zip">
<plugin id="parse-zip" />
</mimeType>
<mimeType name="text/html">
<plugin id="parse-html" />
</mimeType>
<mimeType name="application/xhtml+xml">
<plugin id="parse-html" />
</mimeType>
<mimeType name="text/xml">
<plugin id="parse-tika" />
<plugin id="feed" />
</mimeType>
<!-- Types for parse-ext plugin: required for unit tests to pass. -->
<mimeType name="application/vnd.nutch.example.cat">
<plugin id="parse-ext" />
</mimeType>
<mimeType name="application/vnd.nutch.example.md5sum">
<plugin id="parse-ext" />
</mimeType>
<!-- alias mappings for parse-xxx names to the actual extension implementation
ids described in each plugin's plugin.xml file -->
<aliases>
<alias name="parse-tika"
extension-id="org.apache.nutch.parse.tika.TikaParser" />
<alias name="parse-ext" extension-id="ExtParser" />
<alias name="parse-html"
extension-id="org.apache.nutch.parse.html.HtmlParser" />
<alias name="parse-js" extension-id="JSParser" />
<alias name="feed"
extension-id="org.apache.nutch.parse.feed.FeedParser" />
<alias name="parse-swf"
extension-id="org.apache.nutch.parse.swf.SWFParser" />
<alias name="parse-zip"
extension-id="org.apache.nutch.parse.zip.ZipParser" />
</aliases>
</parse-plugins>
Am I missing any configuration in nutch side?
parsing nutch apache-tika
parsing nutch apache-tika
edited Dec 11 '18 at 11:13
Saran
asked Nov 23 '18 at 9:52
SaranSaran
78112
78112
Have you delete zip exclusion into conf/regex-urlfilter ?-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line
– Quent
Nov 23 '18 at 15:53
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44
add a comment |
Have you delete zip exclusion into conf/regex-urlfilter ?-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line
– Quent
Nov 23 '18 at 15:53
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44
Have you delete zip exclusion into conf/regex-urlfilter ?
-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line– Quent
Nov 23 '18 at 15:53
Have you delete zip exclusion into conf/regex-urlfilter ?
-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line– Quent
Nov 23 '18 at 15:53
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444283%2fnutch-parsing-zip-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53444283%2fnutch-parsing-zip-files%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you delete zip exclusion into conf/regex-urlfilter ?
-(?i).(gif|png|jpg|jpeg|ico|css|sit|eps|wmf|zip|mpg|xls|gz|rpm|tgz|mov|exe|bmp|js)$
Remove zip on this line– Quent
Nov 23 '18 at 15:53
I have removed it already. But still its not working.It is able to see the contents of zip file but not parsing and indexing the content. Is there anything that I need to add specifically?
– Saran
Dec 10 '18 at 8:44