You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Mike Klaas <mi...@gmail.com> on 2007/07/05 01:53:01 UTC

bug in XppUpdateHandler?

I haven't looked into this in depth, but there seems to be a bug with  
the new update handler.

Combining monitor.xml and monitor2.xml into a single add command and  
running ./post.sh twice used to produce:

INFO: DirectUpdateHandler2 deleting and removing dups for 2 ids
INFO: DirectUpdateHandler2 docs deleted=2

but now produces:

INFO: DirectUpdateHandler2 deleting and removing dups for 1 ids
INFO: DirectUpdateHandler2 docs deleted=1

and the search results contain two docs with the same uniqueKey.

If I get a chance I'll take a look to see what the problem is, but I  
haven't touched this section of the code in quite a while.

-Mike

Re: bug in XppUpdateHandler?

Posted by Tristan Vittorio <tr...@gmail.com>.
Thanks Mike, the XPP update request handler seems to work properly, although
from recent discussions, I believe it will be removed before 1.3 is
released, so I suppose the STAX handler will need to be fixed before then.



On 7/5/07, Mike Klaas <mi...@gmail.com> wrote:
>
>
> On 4-Jul-07, at 7:07 PM, Tristan Vittorio wrote:
>
> > I'm experiencing a similar problem, posting the same xml data file
> > to solr
> > results in duplicate documents, despite the fact that I explicitly
> > set "<add
> > allowDups="false">" and can't find anything wrong in my schema.xml
> > config
> > (still have "<uniqueKey>id</uniqueKey>").
>
> You can fix this temporary by adding:
>
>    <requestHandler name="/update"
> class="solr.XppUpdateRequestHandler" />
>
> to your solrconfig.xml.
>
> -Mike
>
>

Re: bug in XppUpdateHandler?

Posted by Mike Klaas <mi...@gmail.com>.
On 4-Jul-07, at 7:07 PM, Tristan Vittorio wrote:

> I'm experiencing a similar problem, posting the same xml data file  
> to solr
> results in duplicate documents, despite the fact that I explicitly  
> set "<add
> allowDups="false">" and can't find anything wrong in my schema.xml  
> config
> (still have "<uniqueKey>id</uniqueKey>").

You can fix this temporary by adding:

   <requestHandler name="/update"  
class="solr.XppUpdateRequestHandler" />

to your solrconfig.xml.

-Mike


Re: bug in XppUpdateHandler?

Posted by Tristan Vittorio <tr...@gmail.com>.
I'm experiencing a similar problem, posting the same xml data file to solr
results in duplicate documents, despite the fact that I explicitly set "<add
allowDups="false">" and can't find anything wrong in my schema.xml config
(still have "<uniqueKey>id</uniqueKey>").

Initially I thought it might be because I set "id" field type to "slong"
instead of "string", however after changing it back to "string" the problem
still occurred.

Interestingly, my xml file contains 6403 documents (say 'x' documents) that
are inserted fine in the first update, however when I run the second update,
numDocs = 12805 (2x - 1) and after the third update, numDocs = 19207 (3x -
2).  It appears to be duplicating all documents except one on each
consecutive update.

I am using the latest svn trunk (revision 553360) to perform this tests,
with no additional modifications to the source.

regards,
Tristan



On 7/5/07, Mike Klaas <mi...@gmail.com> wrote:
>
> Oops, wrong direction.  XppUpdateHandler is fine, the new
> XmlUpdateHandler is exhibiting the bug
>
> On 4-Jul-07, at 4:53 PM, Mike Klaas wrote:
>
> > I haven't looked into this in depth, but there seems to be a bug
> > with the new update handler.
> >
> > Combining monitor.xml and monitor2.xml into a single add command
> > and running ./post.sh twice used to produce:
> >
> > INFO: DirectUpdateHandler2 deleting and removing dups for 2 ids
> > INFO: DirectUpdateHandler2 docs deleted=2
> >
> > but now produces:
> >
> > INFO: DirectUpdateHandler2 deleting and removing dups for 1 ids
> > INFO: DirectUpdateHandler2 docs deleted=1
> >
> > and the search results contain two docs with the same uniqueKey.
> >
> > If I get a chance I'll take a look to see what the problem is, but
> > I haven't touched this section of the code in quite a while.
> >
> > -Mike
>
>

Re: bug in XppUpdateHandler?

Posted by Mike Klaas <mi...@gmail.com>.
Oops, wrong direction.  XppUpdateHandler is fine, the new  
XmlUpdateHandler is exhibiting the bug

On 4-Jul-07, at 4:53 PM, Mike Klaas wrote:

> I haven't looked into this in depth, but there seems to be a bug  
> with the new update handler.
>
> Combining monitor.xml and monitor2.xml into a single add command  
> and running ./post.sh twice used to produce:
>
> INFO: DirectUpdateHandler2 deleting and removing dups for 2 ids
> INFO: DirectUpdateHandler2 docs deleted=2
>
> but now produces:
>
> INFO: DirectUpdateHandler2 deleting and removing dups for 1 ids
> INFO: DirectUpdateHandler2 docs deleted=1
>
> and the search results contain two docs with the same uniqueKey.
>
> If I get a chance I'll take a look to see what the problem is, but  
> I haven't touched this section of the code in quite a while.
>
> -Mike


Re: bug in XppUpdateHandler?

Posted by Mike Klaas <mi...@gmail.com>.
On 5-Jul-07, at 10:44 AM, Ryan McKinley wrote:

> Yonik Seeley wrote:
>> On 7/5/07, Ryan McKinley <ry...@gmail.com> wrote:
>>> >
>>> > If I get a chance I'll take a look to see what the problem is,  
>>> but I
>>> > haven't touched this section of the code in quite a while.
>>> >
>>>
>>> I'm looking at it now...  I'll at least add a test that fails for  
>>> the
>>> Stax version and passes Xpp.
>> You probably need to clear the indexedId between multiple adds.
>
> yup.  fixed in r553574

Thanks Ryan.

-Mike

Re: bug in XppUpdateHandler?

Posted by Ryan McKinley <ry...@gmail.com>.
Yonik Seeley wrote:
> On 7/5/07, Ryan McKinley <ry...@gmail.com> wrote:
>> >
>> > If I get a chance I'll take a look to see what the problem is, but I
>> > haven't touched this section of the code in quite a while.
>> >
>>
>> I'm looking at it now...  I'll at least add a test that fails for the
>> Stax version and passes Xpp.
> 
> You probably need to clear the indexedId between multiple adds.
> 

yup.  fixed in r553574

Re: bug in XppUpdateHandler?

Posted by Yonik Seeley <yo...@apache.org>.
On 7/5/07, Ryan McKinley <ry...@gmail.com> wrote:
> >
> > If I get a chance I'll take a look to see what the problem is, but I
> > haven't touched this section of the code in quite a while.
> >
>
> I'm looking at it now...  I'll at least add a test that fails for the
> Stax version and passes Xpp.

You probably need to clear the indexedId between multiple adds.

-Yonik

Re: bug in XppUpdateHandler?

Posted by Ryan McKinley <ry...@gmail.com>.
> 
> If I get a chance I'll take a look to see what the problem is, but I 
> haven't touched this section of the code in quite a while.
> 

I'm looking at it now...  I'll at least add a test that fails for the 
Stax version and passes Xpp.

ryan