Hi Team,
Executing an XPATH query, on a certain scenario getting inconsistent results. Our Bloomreach release version is 14.7.17
Excluding an specific document type from XPATH search with below query, returning excluded document type result in result.
Our expectation was, results documents exclude type of brxp:AlertMessage and brxp:Disclosure
//element(, hippo:handle)[.//hippo:availability=‘live’ and .//hippo:paths=‘fc15b5b8-1ae6-4276-975b-900a556abc89’ and (.//jcr:primaryType!=‘brxp:Disclosure’ and .//jcr:primaryType!=‘brxp:AlertMessage’ ) and (jcr:contains(., ‘bottom*’) or jcr:contains(., ‘bottom’) or jcr:contains(.//brxp:headline, 'bottom’) or jcr:contains(.//brxp:title, 'bottom’) ) ] order by @jcr:score descending*
Failure Scenario:
If any of the AlertMessage or Disclosure type documents, has publish request/rejected publish request, handle will have an hippo:request child node. In that case, that document will returned in query list. After identified the Root Cause tried to adjust XPATH by excluding hippostdpubwf:request primaryType as mentioned below. But this also giving same result.
//element(, hippo:handle)[.//hippo:availability=‘live’ and .//hippo:paths=‘fc15b5b8-1ae6-4276-975b-900a556abc89’ and (.//jcr:primaryType!=‘brxp:Disclosure’ and .//jcr:primaryType!=‘brxp:AlertMessage’ and .//jcr:primaryType!=‘hippostdpubwf:request’ ) and (jcr:contains(., 'bottom’) or jcr:contains(., ‘bottom’) or jcr:contains(.//brxp:headline, 'bottom’) or jcr:contains(.//brxp:title, 'bottom’) ) ] order by @jcr:score descending*
Thanks,
Gnana moorthi