Home » Developer & Programmer » Application Express & MOD_PLSQL » Apex autocomplete for text search (Apex 4.2)
Apex autocomplete for text search [message #593511] Sat, 17 August 2013 14:32 Go to next message
anil001
Messages: 17
Registered: August 2013
Location: United States
Junior Member
I added an autocomplete search field for an oracle text full search but for the autocomplete field, I need to provide a list of values source.

Does anyone know how to provide list of values from oracle text index values? I do not know which CTX table stores the index values.

Also, I need to prevent copy / paste of the full text from results table. Any idea how to achieve it.
Re: Apex autocomplete for text search [message #593577 is a reply to message #593511] Sun, 18 August 2013 14:27 Go to previous messageGo to next message
Barbara Boehmer
Messages: 7932
Registered: November 2002
Location: California, USA
Senior Member
anil001 wrote on Sat, 17 August 2013 12:32

I do not know which CTX table stores the index values.


The tokens/words are stored in the token_text column of the dr$your_index_name$i domain index table. Please see the demonstration below, where the index name is test_idx, so the tokens are stored in the dr$test_idx$i table.

SCOTT@orcl12c_11gR2> create table test_tab
  2    (test_col  clob)
  3  /

Table created.

SCOTT@orcl12c_11gR2> insert into test_tab (test_col) values (
  2  'I added an autocomplete search field for an oracle text full search but for the autocomplete field, I need to provide a list of values source.
  3  Does anyone know how to provide list of values from oracle text index values? I do not know which CTX table stores the index values.
  4  Also, I need to prevent copy / paste of the full text from results table. Any idea how to achieve it.'
  5  )
  6  /

1 row created.

SCOTT@orcl12c_11gR2> create index test_idx on test_tab (test_col)
  2  indextype is ctxsys.context
  3  /

Index created.

SCOTT@orcl12c_11gR2> select token_text from dr$test_idx$i order by token_text
  2  /

TOKEN_TEXT
----------------------------------------------------------------
ACHIEVE
ADDED
ANYONE
AUTOCOMPLETE
COPY
CTX
FIELD
FULL
IDEA
INDEX
KNOW
LIST
NEED
ORACLE
PASTE
PREVENT
PROVIDE
RESULTS
SEARCH
SOURCE
STORES
TABLE
TEXT
VALUES

24 rows selected.

Re: Apex autocomplete for text search [message #594917 is a reply to message #593577] Wed, 04 September 2013 00:14 Go to previous message
anil001
Messages: 17
Registered: August 2013
Location: United States
Junior Member
Thanks Barbara for very useful information.
Previous Topic: APEX workspace import
Next Topic: apex - jquery page tabs - how to switch programmatically
Goto Forum:
  


Current Time: Wed Jul 23 20:10:16 CDT 2014

Total time taken to generate the page: 0.15510 seconds