lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Estrada Groups <estrada.adam.gro...@gmail.com>
Subject Re: How to use XML parser in DIH for a database?
Date Thu, 17 Feb 2011 13:08:56 GMT
I was also gonna say why even worry about using XPath when you can write a SQL query to get
your data out. Thats what i did and it seems much simpler and cuts out a step.

Adam

Sent from my iPhone

On Feb 16, 2011, at 10:21 PM, Bill Bell <billnbell@gmail.com> wrote:

> Does anyone have an example of using this with SQL Server varchar or XML
> field?
> 
> ??
> 
> <dataConfig>
>    <dataSource />
>    <document>
>        <entity name="y" query="select * from y where xid=${x.id}">
>            <entity name="x" processor="XPathEntityProcessor"
> forEach="/the/record/xpath" url="${y.xml_name}">
>                <field column="full_name" xpath="/field/xpath"/>
>            </entity>
>        </entity>
>    </document>
> </dataConfig>
> 
> 
> 
> On 2/16/11 2:17 AM, "Stefan Matheis" <matheis.stefan@googlemail.com> wrote:
> 
>> What about using
>> http://wiki.apache.org/solr/DataImportHandler#XPathEntityProcessor ?
>> 
>> On Wed, Feb 16, 2011 at 10:08 AM, Bill Bell <billnbell@gmail.com> wrote:
>>> I am using DIH.
>>> 
>>> I am trying to take a column in a SQL Server database that returns an
>>> XML
>>> string and use Xpath to get data out of it.
>>> 
>>> I noticed that Xpath works with external files, how do I get it to work
>>> with
>>> a database?
>>> 
>>> I need something like "//insur[5][@name='Blue Cross']"
>>> 
>>> Thanks.
>>> 
>>> 
>>> 
> 
> 

Mime
View raw message