[MarkLogic Dev General] element-word-match

Geert Josten Geert.Josten at marklogic.com
Mon Jul 13 06:39:16 PDT 2015


Regarding merge and not flushing all deleted fragments, passing in request timestamp is supposed to fix that:

xdmp:merge(
  <options xmlns="xdmp:merge">
     <merge-timestamp>{xdmp:request-timestamp()}</merge-timestamp>
  </options>)

Cheers

From: <general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com>> on behalf of Andreas Hubmer <andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Monday, July 13, 2015 at 3:30 PM
To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] element-word-match

Hi,

> I think in recent versions of ML it's the case that calling merge won¹t
> necessarily merge right down to 0 deleted fragments?
Yes, that seems to be the case. Even long after calling xdmp:merge the deleted fragments exist.

> But anyway, you shouldn¹t see deleted fragments in queries. It¹s more
> likely because all the tests run in one transaction. Are you using the
> setup/teardown annotations in xray to insert/delete?
It's not a matter of a single transaction. When I run cts:element-word-match in the QConsole manually after the Unit-Tests have finished, the problem still exists.
It seems that I see deleted fragments in queries.

Cheers,
Andreas



2015-07-13 15:08 GMT+02:00 Whitby, Rob <rob.whitby at springer.com<mailto:rob.whitby at springer.com>>:
I think in recent versions of ML it's the case that calling merge won¹t
necessarily merge right down to 0 deleted fragments?

But anyway, you shouldn¹t see deleted fragments in queries. It¹s more
likely because all the tests run in one transaction. Are you using the
setup/teardown annotations in xray to insert/delete? The general pattern
is like this:


declare %test:setup insert-data()
{
  xdmp:document-insert('foo.xml', <foo/>)
};


declare %test:teardown delete-data()
{
  xdmp:document-delete('foo.xml')
};

declare %test:case should-see-foo()
{
  assert:true(fn:doc-available('foo.xml'))
};






From:  Geert Josten <Geert.Josten at marklogic.com<mailto:Geert.Josten at marklogic.com>>
Reply-To:  MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date:  Monday, 13 July 2015 13:55
To:  MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject:  Re: [MarkLogic Dev General] element-word-match


That should disappear once below merge completes. Perhaps give it time to
finish by adding a xdmp:sleep somewhere..

Cheers

From: <general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com>> on behalf of Andreas
Hubmer <andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Monday, July 13, 2015 at 2:46 PM
To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] element-word-match


Hi Geert,

Thanks for your fast reply.
Unfortunately, xdmp:merge does not make a difference.

In the Administration UI I can see that 1 deleted fragment gets added
every time I run the unit test.

Cheers,
Andreas


2015-07-13 14:13 GMT+02:00 Geert Josten
<Geert.Josten at marklogic.com<mailto:Geert.Josten at marklogic.com>>:

Hi Andreas,

I suspect DOC-A is still among the deleted fragments, and if you run
certain (unfiltered?) queries as an admin user, you could see results from
deleted documents. Try running this in between to see if that makes a
difference:

xdmp:merge(
  <options xmlns="xdmp:merge">
     <merge-timestamp>{xdmp:request-timestamp()}</merge-timestamp>
  </options>)


Cheers,
Geert

From: <general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com>> on behalf of Andreas
Hubmer <andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Monday, July 13, 2015 at 2:00 PM
To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject: [MarkLogic Dev General] element-word-match


Hi,

In a unit test (using xray) I insert a document DOC-A and delete it
afterwards. The administration UI shows afterwards that the database
contains 0 documents.


Afterwards (in another unit test) I use cts:element-word-match for
auto-completion purposes. Now I have the strange issue that
cts:element-word-match returns values even though my database is empty.
The values it returns are from DOC-A. To me it seems
 that the document got deleted but its values were not properly removed
from the element word lexicon.

Even waiting for 10 minutes didn't help.

As I understand it this should not happen.
Is there something I miss?

The reindexer is enabled on the database. Manually calling "merge" on the
database's only forest doesn't help. Disabling and enabling the forest
doesn't help either. Only calling "clear" on the forest helps to get rid
of the wrong lexicon values.
I can consistently reproduce the problem.
I am using MarkLogic 8.0-2.

Best regards,
Andreas



--
Andreas Hubmer

IT Consultant

EBCONT enterprise technologies GmbH
Millennium Tower
Handelskai 94-96
A-1200 Vienna

Email:
andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com> <mailto:andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>>

Web: http://www.ebcont.com

OUR TEAM IS YOUR SUCCESS

UID-Nr. ATU68135644
HG St.Pölten - FN 399978 d












_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general







--
Andreas Hubmer

IT Consultant

EBCONT enterprise technologies GmbH
Millennium Tower
Handelskai 94-96
A-1200 Vienna

Mobile: +43 664 60651861<tel:%2B43%20664%2060651861>
Fax: +43 2772 512 69-9<tel:%2B43%202772%20512%2069-9>
Email:
andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com> <mailto:andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>>
Web: http://www.ebcont.com

OUR TEAM IS YOUR SUCCESS

UID-Nr. ATU68135644
HG St.Pölten - FN 399978 d

_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general



--
Andreas Hubmer
IT Consultant

EBCONT enterprise technologies GmbH
Millennium Tower
Handelskai 94-96
A-1200 Vienna

Email: andreas.hubmer at ebcont.com<mailto:andreas.hubmer at ebcont.com>
Web: http://www.ebcont.com

OUR TEAM IS YOUR SUCCESS

UID-Nr. ATU68135644
HG St.Pölten - FN 399978 d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150713/ad4713b3/attachment-0001.html 


More information about the General mailing list