Thanks Fergus, setting the field to multivalued did work:
      <field column="body" xpath="/book/body/chapter/p" flatten="true"/>
gets all the <p> elements as multivalue fields in the body field.

The only thing is, the body field is used by some other content sources, so
I have to look at the implications setting it to multi-valued will have on
the other data sources. Still, this might do the trick.

Thanks to all that helped on this!

-Jay



On Thu, Jul 2, 2009 at 11:40 AM, Fergus McMenemie <fer...@twig.me.uk> wrote:

> >Shalin Shekhar Mangar wrote:
> >> On Thu, Jul 2, 2009 at 11:08 PM, Mark Miller <markrmil...@gmail.com>
> wrote:
> >>
> >>
> >>> It looks like DIH implements its own subset of the Xpath spec.
> >>>
> >>
> >>
> >> Right, DIH has a streaming implementation supporting a subset of XPath
> only.
> >> The supported things are in the wiki examples.
> >>
> >>
> >>
> >>> I don't see any tests with multiple matching sub nodes, so perhaps DIH
> >>> Xpath does not properly support that and just selects the last matching
> >>> node?
> >>>
> >>
> >>
> >> It selects all matching nodes. But if the field is not multi-valued, it
> will
> >> store only the last value. I guess this is what is happening here.
> >>
> >>
> >So do you think it should match them all and add the concatenated text
> >as one field?
> >
> >That would be more Xpath like I think, and less arbitrary than just
> >choosing the last one.
>
> Only when the field in schema.xml in not multiValued. If the field is
> multiValued is should still behave as at present?
>
> Also... what went wrong with the suggested:-
>     <field column="body" xpath="/book/body/chapter flatten="true"/>
>
> Regards Fergus.
>

Reply via email to