[
https://issues.apache.org/jira/browse/NUTCH-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482644#comment-13482644
]
Sebastian Nagel commented on NUTCH-1467:
----------------------------------------
Hi Kiran,
thanks for the patch. After a look at it:
* instead of replacing {{Properties generalTags}} in HTMLMetaTags.java by a
{{HashMap<String, String[]>}} it seems preferable to use the class
{{metadata.Metadata}}:
** provides the required methods
*** add one more value to an array of values
*** {{toString()}} etc.
** would shorten the code significantly
** sufficiently tested (own JUnit test)
* in addition to {{parse.html.HTMLMetaProcessor.java}} also
{{parse.tika.HTMLMetaProcessor.java}} needs to be modified
Also, as Julien mentioned, a test would be useful. Added
NUTCH-1467-TEST-1.patch as a first draft. Can you have a look at the test? Are
all situations covered? Promising: test passes with the current patch applied :)
> nutch 1.5.1 not able to parse mutliValued metatags
> --------------------------------------------------
>
> Key: NUTCH-1467
> URL: https://issues.apache.org/jira/browse/NUTCH-1467
> Project: Nutch
> Issue Type: Bug
> Affects Versions: 1.5.1
> Reporter: kiran
> Priority: Minor
> Fix For: 1.6
>
> Attachments: NUTCH-1467-TEST-1.patch, NUTCH-1467-trunk.patch,
> Patch_HTMLMetaProcessor.patch, Patch_HTMLMetaTags.patch,
> Patch_MetadataIndexer.patch, Patch_MetaTagsParser.patch, patch.txt
>
>
> Hi,
> I have been able to parse metatags in an html page using
> http://wiki.apache.org/nutch/IndexMetatags. It does not work quite well when
> there are two metatags with same name but two different contents.
> Does anyone encounter this kind of issue ?
> Are there any changes that need to be made to the config files to make it
> work ?
> When there are two tags with same name and different content, it takes the
> value of the later tag and saves it rather than creating a multiValue field.
> Edit: I have attached the patch for the file and it is provided by DLA
> (Digital Library and Archives) http://scholar.lib.vt.edu/ of Virginia Tech.
> Many Thanks,
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira