@@ -272,7 +272,9 @@ public function applyAction(\Psr\Http\Message\ServerRequestInterface $requestInt
272
272
}
273
273
274
274
if (!file_exists ($ tmpNode ->getUrl ())) {
275
- $ this ->currentType ->deleteById ($ hit ->getId ());
275
+ try {
276
+ $ this ->currentType ->deleteById ($ hit ->getId ());
277
+ }catch (Elastica \Exception \NotFoundException $ nfe ){}
276
278
continue ;
277
279
}
278
280
@@ -333,7 +335,9 @@ public function applyAction(\Psr\Http\Message\ServerRequestInterface $requestInt
333
335
$ tmpNode ->loadNodeInfo ();
334
336
}
335
337
if (!file_exists ($ tmpNode ->getUrl ())) {
336
- $ this ->currentType ->deleteById ($ hit ->getId ());
338
+ try {
339
+ $ this ->currentType ->deleteById ($ hit ->getId ());
340
+ }catch (Elastica \Exception \NotFoundException $ eEx ){}
337
341
continue ;
338
342
}
339
343
$ tmpNode ->search_score = sprintf ("%0.2f " , $ hit ->score );
@@ -392,12 +396,18 @@ public function updateNodeIndexMeta($node)
392
396
foreach ($ hits as $ hit ) {
393
397
$ source = $ hit ->getSource ();
394
398
if ($ source ['ajxp_scope ' ] == 'shared ' || ($ source ['ajxp_scope ' ] == 'user ' && $ source ['ajxp_user ' ] == $ node ->getContext ()->getUser ()->getId ())) {
395
- $ this ->currentType ->deleteById ($ hit ->getId ());
399
+ try {
400
+ $ this ->currentType ->deleteById ($ hit ->getId ());
401
+ }catch (Elastica \Exception \NotFoundException $ eEx ){}
396
402
}
397
403
}
398
404
} else {
399
405
$ id = $ this ->getIndexedDocumentId ($ node );
400
- if ($ id != null ) $ this ->currentType ->deleteById ($ id );
406
+ if ($ id != null ) {
407
+ try {
408
+ $ this ->currentType ->deleteById ($ id );
409
+ }catch (Elastica \Exception \NotFoundException $ eEx ){}
410
+ }
401
411
}
402
412
$ this ->createIndexedDocument ($ node );
403
413
@@ -433,7 +443,9 @@ public function updateNodeIndex($oldNode, $newNode = null, $copy = false, $recur
433
443
$ childrenHits = $ childrenHits ->getResults ();
434
444
435
445
foreach ($ childrenHits as $ hit ) {
436
- $ this ->currentType ->deleteById ($ hit ->getId ());
446
+ try {
447
+ $ this ->currentType ->deleteById ($ hit ->getId ());
448
+ }catch (Elastica \Exception \NotFoundException $ eEx ){}
437
449
}
438
450
}
439
451
}
@@ -479,7 +491,9 @@ public function updateNodeIndex($oldNode, $newNode = null, $copy = false, $recur
479
491
foreach ($ childrenHits as $ hit ) {
480
492
$ oldChildURL = $ this ->currentType ->getDocument ($ hit ->getId ())->get ("node_url " );
481
493
if ($ copy == false ) {
482
- $ this ->currentType ->deleteById ($ hit ->getId ());
494
+ try {
495
+ $ this ->currentType ->deleteById ($ hit ->getId ());
496
+ }catch (Elastica \Exception \NotFoundException $ eEx ){}
483
497
}
484
498
$ newChildURL = str_replace ($ oldNode ->getUrl (),
485
499
$ newNode ->getUrl (),
0 commit comments