Ah, I missed that part.

The problem that you have is because you have forEach="/feed/entry" but you
want to read /feed/link as a common field. You need to have forEach="/feed
| /feed/entry" which should let you have both /feed/link as well as
/feed/entry/link.


On Thu, May 30, 2013 at 1:25 PM, Hans-Peter Stricker
<stric...@epublius.de>wrote:

> Thanks for having analyzed the problem. But please let me note that I came
> to a somehow different conclusion.
>
> Define for the moment "title" to be the primary unique key:
>
> solr-4.3.0\example\example-DIH\solr\rss\conf\schema.xml
>
> <uniqueKey>title</uniqueKey>
>
> solr-4.3.0\example\example-DIH\solr\rss\conf\rss-data-config.xml
>
> [BAD CASE] (irrespective of the predicate @rel='self')
> <dataConfig>
>     <dataSource type="URLDataSource" />
>     <document>
>         <entity name="beautybooks88 " pk="title" url="
> http://beautybooks88.blogspot.com/feeds/posts/default";
> processor="XPathEntityProcessor" forEach="/feed/entry"
> transformer="DateFormatTransformer">
>             <field column="title" xpath="/feed/entry/title" />
>             <field column="source-link"
> xpath="/feed/link[@rel='self']/@href" commonField="true" />
>         </entity>
>     </document>
> </dataConfig>
>
> [GOOD CASE]
> <dataConfig>
>     <dataSource type="URLDataSource" />
>     <document>
>         <entity name="beautybooks88 " pk="title" url="
> http://beautybooks88.blogspot.com/feeds/posts/default";
> processor="XPathEntityProcessor" forEach="/feed/entry"
> transformer="DateFormatTransformer">
>             <field column="title" xpath="/feed/entry/title" />
>             <field column="link"
> xpath="/feed/entry/link[@rel='self']/@href" />
>         </entity>
>     </document>
> </dataConfig>
>
> Conclusion: It has nothing to do with the number of occurrences of the
> pattern.




-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to