Hi Peter,

Try adding the primary key attribute to the root entity 'ad' and check if
delta import works.
By the way, which database are you using ?

On Tue, Jul 12, 2011 at 10:27 AM, PeterKerk <vettepa...@hotmail.com> wrote:

>
> I'm having an issue with a delta import.
>
> I have the following in my data-config.xml:
>
>    <document name="ads">
>        <entity name="ad"
>                query="select * from ads WHERE approvedate > '1/1/1900' and
> publishdate
> < getdate() AND depublishdate > getdate() and deletedate = '1/1/1900'"
>                deltaImportQuery="select * from ads WHERE approvedate >
> '1/1/1900' and
> publishdate < getdate() AND depublishdate > getdate() and deletedate =
> '1/1/1900' and id='${dataimporter.delta.id}'"
>                deltaQuery="select id from ads where updatedate >
> '${dataimporter.last_index_time}'">
>
>                        <entity name="photo" query="select locpath as
> locpath FROM ad_photos
> where adid=${ad.id}"
>                        deltaImportQuery="select locpath as locpath FROM
> ad_photos where
> adid='${dataimporter.delta.id}'"
>                        deltaQuery="select locpath as locpath FROM ad_photos
> where createdate
> > '${dataimporter.last_index_time}'">
>                                <field name="photos" column="locpath"  />
>                        </entity>
>
>        </entity>
>    </document>
>
> Now, when I add a new photo to the ad_photos table, its not index when I
> perform a delta import like so:
> http://localhost:8983/solr/i2m/dataimport?command=delta-import.
> When I do a FULL import I do see the new images.
>
>
> Here's the definition of ad_photos table:
>
> CREATE TABLE [dbo].[ad_photos](
>        [id] [int] IDENTITY(1,1) NOT NULL,
>        [adid] [int] NOT NULL,
>        [locpath] [nvarchar](150) NOT NULL,
>        [title] [nvarchar](50) NULL,
>        [createdate] [datetime] NOT NULL,
>  CONSTRAINT [PK_ad_photos] PRIMARY KEY CLUSTERED
> (
>        [id] ASC
> )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY =
> OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
> ) ON [PRIMARY]
>
> GO
>
>
>
> What am I doing wrong?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Delta-import-issue-tp3162581p3162581.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Thanks and Regards
Rahul A. Warawdekar

Reply via email to