Hi folks,
I can't figure how to to search for text within a specific section.
Here is my XML:
<section id="Salutation" caption="En-tête et salutations">
<paragraph id="Salutation" phlitemid="Salutation">
<p>Faxmed de sortie Le patient susnommé a séjourné dans notre service</p>
</paragraph>
</section>
<section id="Anamnese_Faxmed" caption="Anamnèse">
<paragraph id="TexteLibre" phlitemid="TexteLibre"/>
<paragraph id="CHUV_AsmtPg_Entree_20170628 16:51:00"
phlitemid="CHUV_AsmtPg_Entree">Anamnèse à l'entrée
</paragraph>
</section>
Here is my INDEX CREATION script
[START]
-- PREFERENCES SETTING
EXEC CTX_DDL.DROP_PREFERENCE('LETTER_DS')
-- PARAMETER: DATASTORE
EXEC CTX_DDL.CREATE_PREFERENCE('LETTER_DS', 'DIRECT_DATASTORE')
-- PARAMETER: SECTIONER
EXEC CTX_DDL.DROP_SECTION_GROUP('LETTRE_SECGRP')
EXEC CTX_DDL.CREATE_SECTION_GROUP('LETTRE_SECGRP', 'AUTO_SECTION_GROUP')
-- PARAMETER: LEXER
EXEC CTX_DDL.DROP_PREFERENCE('LETTRE_LXR')
exec CTX_DDL.CREATE_PREFERENCE('LETTRE_LXR', 'BASIC_LEXER')
-- ATTRIBUTE: LEXER
exec CTX_DDL.SET_ATTRIBUTE('LETTRE_LXR', 'PRINTJOINS', '_')
-- CREATE INDEX
CREATE INDEX myIndex on myTable(myCLOBCOLUMN)
INDEXTYPE is ctxsys.context
PARAMETERS ('
datastore LETTER_DS
section group LETTRE_SECGRP
lexer LETTRE_LXR
memory 1g
')
parallel 16;
[END]
I'm trying to ping every record that has the word 'susnommé' within the section having id="Salutation"
AUTO_SECTION_GROUP does the job as it even creates in the I$ table the following attribute sections (token type = 5):
- PARAGRAPH@ID
- PARAGRAPH@PHLITEMID
- SECTION@CAPTION
- SECTION@ID
Here are the QUERIES I have done so far
- SELECT * FROM myTable WHERE CONTAINS(myCLOBCOLUMN,'susnommé')>0; --> A record is returned
- SELECT * FROM GBE_TEST_LETTRE_XSLT WHERE CONTAINS(TEXT,'susnommé WITHIN SALUTATION')>0; --> No record is returned (even if SALUTATION appers in the I$ table with token type = 4
- SELECT * FROM GBE_TEST_LETTRE_XSLT WHERE CONTAINS(TEXT,'SALUTATION WITHIN SECTION@ID AND anamnèse')>0; --> A record is returned while anamnèse is not in the SALUTATION section
Any help would be greatly appreciated