2 Replies Latest reply on Jun 11, 2012 5:03 PM by Bagagem

    [Text Index] Execute queries with repeated words

      Hello everyone,

      We have a text index of type CONTEXT, to enable fast searches on a table with thousands of records. Each record have multiple words, the most common is between 3 and 10.

      Our purpose is to provide flexible text queries - ignoring portuguese special characters - in this table, which includes the possibility to type repeated words in the query clause, for example:

      The query "JOÃO JOÃO" (provided by the where clause "contains(t.column, 'JOÃO AND JOÃO', 1)" ) should return records such as "JOÃO JOAO", "JOAO JOÃO DOE" or "HENRY JOÃO JOAO", among others.

      The problem is that the indexer detects a duplicate word and searches all the records that includes the word "JOHN" only once, which is not desirable in this case...

      The attributes used to create the indexer are as follows:
      Ctx_Ddl.Create_Preference ('my_lexer','BASIC_LEXER');
      Ctx_Ddl.Set_Attribute ( 'my_lexer', 'mixed_case', 'FALSE');
      Ctx_Ddl.Set_Attribute ( 'my_lexer', 'base_letter','TRUE');

      Is there any way to enable this kind of 'literal' queries through the indexer?

      Best regards,