You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2016/10/11 15:14:26 UTC

[jira] [Resolved] (SOLR-5803) flatten="false" not working for XPathEntityProcessor

     [ https://issues.apache.org/jira/browse/SOLR-5803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dawid Weiss resolved SOLR-5803.
-------------------------------
    Resolution: Won't Fix

Better late then never. This isn't a bug, Jan, this is by design (whether this makes sense or not is not part of this issue).

When you use {{flatten="false"}} you get only text (sub)nodes from the XPath you pointed at, child nodes are omitted.

> flatten="false" not working for XPathEntityProcessor
> ----------------------------------------------------
>
>                 Key: SOLR-5803
>                 URL: https://issues.apache.org/jira/browse/SOLR-5803
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.6
>            Reporter: Jan Mach
>              Labels: easytest, flatten
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> I would like to get nested entities under the tag dc:contributor
> 	<dc:contributor>
> 		<pcz:foreName>John</pcz:foreName>
> 		<pcz:surName>Doe</pcz:surName>
> 	</dc:contributor>
> When I use flatten="true", I get contributor="\n\t\tJohn\n\t\tDoe\n   " - it's OK (I can replace \n\t with a regex).
> But when I use flatten="false":
>   <field column="contributor" xpath="/metadata/contributor" flatten="false" />                                
> I get contributor="\n\t\t\n\t\t\n   " ?! I expect to get xml, both child nodes pcz:foreName, including tag names and tags content. 
> 1) What I do wrong, is it a bug, do you test flatten="false"?
> 2) The page http://wiki.apache.org/solr/DataImportHandler#Configuration_in_data-config.xml-1 says the optional parameter flatten is part of the entity tag, but it must be IMHO part of the field tag.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org