Text Query Involving Nested Proximity Returns Inconsistent Results

(Doc ID 1683433.1)

Last updated on JULY 13, 2015

Applies to:

Oracle Text - Version 11.2.0.2 to 12.1.0.1 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

The following Text query, which involves nested proximity, returns inconsistent results:

SELECT count(S.document_id) INTO cnt FROM (
    SELECT /*+ FULL parallel(td dft d) */ DISTINCT DOCUMENT_ID
    FROM
    (
      SELECT DOCUMENT_ID
      FROM document_field_text_ts dft
      WHERE contains (value, '[near(((bsarm or (bear)),([near(((05 or 2005),10),4)])),13)]', 1) > 0
    UNION ALL
      SELECT document_id
      FROM DOCUMENT_TEXT_TS dt
      WHERE CONTAINS (DOCUMENT_TEXT, '[near(((bsarm or (bear)),([near(((05 or 2005),10),4)])),13)]') > 0
    )
  ) S
  JOIN DOCUMENT D ON S.DOCUMENT_ID=D.DOCUMENT_ID WHERE D.DOC_STATE IN ( 1,2,3 );

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms