You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Robert Haycock <Ro...@artificial-solutions.com> on 2014/04/24 16:05:22 UTC

Overriding SearchIndex.updateNodes - removing

Hi,

Jackrabbit 2.6.4

I've overridden SearchManager.updateNodes(Iterator<NodeId> remove, Iterator<NodeState> add) to create my own index. This index should reflect the current state so when a node is deleted it should be removed.

I can see when I delete a node that the NodeId does'nt exist in remove but there is an unstructured NodeState in add.

Could someone please tell me how I can remove documents from my own index.

Thanks,
Rob.

RE: Overriding SearchIndex.updateNodes - removing

Posted by Robert Haycock <Ro...@artificial-solutions.com>.
I've just realised that the NodeState with type unstructured relates to a later call to updateNodes(). The call I'm interested in is the previous one where my deleted NodeId/NodeState appears in both add/remove.

It appears that  modifying or deleting, both actions result in the NodeId/NodeState appearing in both parameters.

Please could someone shed some light on how I should differentiate between  modify/delete. Or a better approach.

Rob.

-----Original Message-----
From: Robert Haycock [mailto:Robert.Haycock@artificial-solutions.com] 
Sent: 24 April 2014 15:05
To: users@jackrabbit.apache.org
Subject: Overriding SearchIndex.updateNodes - removing

Hi,

Jackrabbit 2.6.4

I've overridden SearchManager.updateNodes(Iterator<NodeId> remove, Iterator<NodeState> add) to create my own index. This index should reflect the current state so when a node is deleted it should be removed.

I can see when I delete a node that the NodeId does'nt exist in remove but there is an unstructured NodeState in add.

Could someone please tell me how I can remove documents from my own index.

Thanks,
Rob.