Oracle text synchronization
Hi,
we are working on a search engine based on Oracle Text and we use an index that is automatically synchronized at regular interval.
But I've noticed a strange behaviour and wanted to know if someone had an issue to circumvent it.
Here is the table we declare :
create table ADSOTEXT(
OBJID varchar2(16) not null,
OBJFIELDURLLANG varchar2(16) default 'DEFAULT',
OBJFIELDURL varchar2(2048),
OBJFIELDURLCHARSET varchar2(16) default 'UTF8',
OBJFIELDURLFORMAT varchar2(16),
BOBJFIELDURL NUMBER(4) default 0
There, the index creation order :
begin
ctx_ddl.create_section_group('axmlgroup', 'XML_SECTION_GROUP');
ctx_ddl.add_field_section('axmlgroup', 'OBJREM', 'OBJREM',TRUE);
ctx_ddl.add_field_section('axmlgroup', 'CLASSID', 'CLASSID',TRUE);
ctx_ddl.add_field_section('axmlgroup', 'OBJID', 'OBJID',TRUE);
ctx_ddl.add_field_section('axmlgroup', 'OBJREF', 'OBJREF',TRUE);
ctx_ddl.add_field_section('axmlgroup', 'OBJNAME', 'OBJNAME',TRUE);
ctx_ddl.add_field_section('axmlgroup', 'EXTRAFIELDS', 'EXTRAFIELDS',TRUE);
end;
--30 minutes pour la synchronisation
drop index ADSOTEXT_XOBJFIELDURL force;
create index ADSOTEXT_XOBJFIELDURL on ADSOTEXT(OBJFIELDURL) indextype is ctxsys.context
parameters
('datastore ctxsys.file_datastore
filter ctxsys.inso_filter
lexer global_lexer
language column OBJFIELDURLLANG
charset column OBJFIELDURLCHARSET
format column OBJFIELDURLFORMAT
section group axmlgroup
Wordlist wildcard_pref
SYNC (EVERY "trunc(sysdate+10/480,''MI'')" )
The first time we insert a row for a file in the table ADSOTEXT, Oracle will process synchronization of information around 30 minutes later.
But if we update file information, so we make an update for this file on an existing row of the table,
Oracle seem to first remove every indexation information relating to that file and process synchronizaton 30 minutes later : this is
a little bit annoying because we won't be able to find this file through a search for around 30 minutes.
Is there a way to make those 2 steps made at the same time ?(ie unundexing words and synchronization)
NB :
My English is quite poor so there are things that I can't completely understand in the Oracle text documentation :
I'm reading about the option TRANSACTIONAL while creating Oracle Text indexes and as far as I can understnd, it should solve my problems : I'am right ?
Quote from Oracle text documentation :
"Specify that documents can be searched immediately after they are inserted or updated. If a text index is created with TRANSACTIONAL enabled, then, in addition to
processing the synchronized rowids already in the index, the CONTAINS operator will process unsynchronized rowids as well. (That is, Oracle Text does in-memory indexing of unsynchronized rowids and processes the query against the in-memory index.)"
Message was edited by:
perigee_dev2
Message was edited by:
perigee_dev2
The first time we insert a row for a file in the
table ADSOTEXT, Oracle will process synchronization
of information around 30 minutes later.
But if we update file information, so we make an
update for this file on an existing row of the
table,
Oracle seem to first remove every indexation
information relating to that file and process
synchronizaton 30 minutes later : this is
a little bit annoying because we won't be able to
find this file through a search for around 30
minutes.Yes it is so. Friend of me have this issue too. I personaly use ctxcat index and build of this index is transactional - after commit.
Is there a way to make those 2 steps made at the same
time ?(ie unundexing words and synchronization)How to use shorter interval? Every minute?
Do you use 10g?
dap
Similar Messages
-
Hello
Had a query on oracle Text Index.
1. I have created a table with column ID as sequence & column description as Varchar2(500)
2. Inserted 3 records
3. I created the Oracle Text index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
4. Run a select using "contains" , get the records as required.
5. I insert another new record & commit;
6. Run the same old query using contains but for the new records I get 0 records
7. Drop the Index and Recreate the index using same old index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
8. Run the same old query using contains but for the new records and now I get the records as required.
Does that mean every time I insert new records I have to rebuild the Oracle Text Index ?
Your Help will be much appreciated
Regards
HarshadYou need to use some method of updating your index. You can drop and recreate or you can rebuild or you can use ctx_ddl.sync_index or you can include sync(on commit) in your parameters when you create the index or various other methods of periodic synchronization and optimization.
-
Oracle Text performance -- failed attempts
We are trying to implement a simple search of text data stored in a heavily used table (inserts/updates). There are 3 columns to index --
Headline (varchar2(255))
Subheadline (varchar2(255))
Teaser (varchar2(4000))
The first attempt to implement Oracle text w/ CATSEARCH
begin
ctx_ddl.create_index_set('cms_iset');
ctx_ddl.add_index('cms_iset','poolid_cp, mediaid_cp'); /* sub-index A */
end;
---- We knew we were going to filter on poolid_cp and mediaid_cp ---
CREATE INDEX cms_headlineidx ON con_properties (headline)
INDEXTYPE IS ctxsys.CTXCAT
PARAMETERS ('index set cms_iset');
CREATE INDEX cms_subheadlineidx ON con_properties (subheadline)
INDEXTYPE IS ctxsys.CTXCAT
PARAMETERS ('index set cms_iset');
CREATE INDEX cms_teaseridx ON con_properties (teaser)
INDEXTYPE IS ctxsys.CTXCAT
PARAMETERS ('index set cms_iset');
*********THE RESULTS*************
Our application server would spin up threads that would appear to be hanging. The load on the DB servers (RAC) were higher than normal. This implementation would have saved on having to do resync's manually.
The next attempt was implementing w/ CONTEXT:
alter table con_properties add (dummy varchar2(1));
begin
ctx_ddl.create_preference('con_propsearch', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute('con_propsearch', 'columns', 'headline,subheadline,teaser');
end;
CREATE INDEX con_properties_searchidx
ON con_properties(dummy)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('datastore CTXSYS.con_propsearch')
Records getting put into the ctx_user_pending table a few hundred per hour.
********THE RESULTS*************
Same issue with the application servers spinning off threads that seem to be hung. Spikey load on the DB servers (RAC).
NOTE: In both implementations, running search querys ran OK. However, dropping the text index in BOTH cases caused the application servers to behave normally.
Can anyone tell me what's going on internally with Oracle TEXT when a table is heavily inserted and updated? What is going on in the background. Is there some sort of lock that the app servers are waiting on? I know there is "overhead" with inserts on a normal b-tree index. Is it "exponential" with Oracle Text?
Thank you!When documents in the base table are inserted, updated, or deleted, their ROWIDs are held in a DML queue until you synchronize the index. You can view this queue with the CTX_USER_PENDING view. Apparently, you are not synchronizing your context index, so the queue is building infinitely. You need to establish some method of synchronizing your index. You can use parameters('sync(on commit)') in your index creation or create an after insert or update statement level trigger, not row trigger, that uses dbms_job.submit to schedule ctx_ddl.sync_index to synchronize the index upon commit of the dml or you can manually run ctx_ddl.sync_index periodically or schedule it or you can alter and rebuild your index periodically or you can drop and recreate it periodically. Which method you choose depends on how current the information that you query needs to be. If your data needs to be current up to the moment, the you should sync on commit. Otherwise it may be better to do it in periodic batches.
-
I have created a 250 pages Oracle portal for a corporation. The enterprise content is about 500Mb of docs, pdfs, pps. I have Oracle Text enabled via Global Settings (Oracle 10g), but during searches the results are all based on titles and keywords. No in text searching results. Can anybody give me some advice and explain me why Oracle Text feature doesn't work. The necessary table and index files are created by default or i must create them and if 'yes' where? Which are the SQL+ statements to check and utilize Oracle Text's indexes? It's all about content synchronization or not? I have met the Oracle Text dead-end, please help me.
Hi
Have you looked at the OracleAS Portal Configuration Guide? The latest version (10.1.4) is available from here - http://www.oracle.com/technology/documentation/appserver101202.html.
Click View Library, then the Portals tab. The 10.1.4 and 10.1.2 versions of the Portal Configuration Guide are both available from here.
Specificallly, see:
- 8.1.3 Default Search Functionality (http://download-uk.oracle.com/docs/cd/B14099_19/portal.1014/b19305/cg_srch.htm#i1040939)
- 8.3.5.1 Synchronizing Oracle Text Indexes (http://download-uk.oracle.com/docs/cd/B14099_19/portal.1014/b19305/cg_srch.htm#i1027594)
Hope this helps
Rosie -
Error while synchronizing oracle text.
Hi,
I am getting below error when synchronize oracle text index. I checked in database mentoined index is present in user schema. My database version is oracle 9.2.0.7.
BEGIN ctx_ddl.sync_index ( 'IDX_DEPDOCUMENTOBJECT') END;
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drekmap (lob write)
ORA-01403: No data found
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.CTX_DDL", line 1328
ORA-06512: at line 1
Pls suggest how i troubleshoot this error message.
Thanks in advance.
Edited by: user8943509 on Mar 16, 2010 5:15 AMSCOTT@orcl_11g> CREATE USER u1 IDENTIFIED BY u1
2 /
User created.
SCOTT@orcl_11g> GRANT CONNECT, RESOURCE, CTXAPP TO u1
2 /
Grant succeeded.
SCOTT@orcl_11g> GRANT EXECUTE ON CTXSYS.CTX_DDL TO u1
2 /
Grant succeeded.
SCOTT@orcl_11g> CREATE USER u2 IDENTIFIED BY u2
2 /
User created.
SCOTT@orcl_11g> GRANT CONNECT, RESOURCE TO u2
2 /
Grant succeeded.
SCOTT@orcl_11g> CONNECT u1/u1
Connected.
U1@orcl_11g>
U1@orcl_11g> CREATE TABLE u1_tab (u1_col CLOB)
2 /
Table created.
U1@orcl_11g> CREATE INDEX u1_idx
2 ON u1_tab (u1_col)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 /
Index created.
U1@orcl_11g> INSERT INTO u1_tab VALUES ('whatever')
2 /
1 row created.
U1@orcl_11g> COMMIT
2 /
Commit complete.
U1@orcl_11g> CREATE OR REPLACE PROCEDURE u1_proc
2 AS
3 BEGIN
4 ctx_ddl.sync_index ( 'U1.U1_IDX');
5 END u1_proc;
6 /
Procedure created.
U1@orcl_11g> SHOW ERRORS
No errors.
U1@orcl_11g> GRANT EXECUTE ON u1_proc TO u2
2 /
Grant succeeded.
U1@orcl_11g> SELECT * FROM u1_tab
2 WHERE CONTAINS (u1_col, 'whatever') > 0
3 /
no rows selected
U1@orcl_11g> CONNECT u2/u2
Connected.
U2@orcl_11g>
U2@orcl_11g> EXEC u1.u1_proc
PL/SQL procedure successfully completed.
U2@orcl_11g> CONNECT u1/u1
Connected.
U1@orcl_11g>
U1@orcl_11g> SELECT * FROM u1_tab
2 WHERE CONTAINS (u1_col, 'whatever') > 0
3 /
U1_COL
whatever
U1@orcl_11g> -
Help needed with oracle text special character search
Hi all
Using oracle 11g sql developer 4.0
I am facing this challenge where Oracle text when it comes to searching text that contains special character.
This what I have done so far with help of http://www.orafaq.com/forum/t/162229/
CREATE TABLE "SOS"."COMPANY"
( "COMPANY_ID" NUMBER(10,0) NOT NULL ENABLE,
"COMPANY_NAME" VARCHAR2(50 BYTE),
"ADDRESS1" VARCHAR2(50 BYTE),
"ADDRESS2" VARCHAR2(10 BYTE),
"CITY" VARCHAR2(40 BYTE),
"STATE" VARCHAR2(20 BYTE),
"ZIP" NUMBER(5,0)
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ;
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (1,'LSG SOLUTIONS LLC',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (2,'LOVE''S TRAVEL',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (3,'DEVON ENERGY',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (4,'SONIC INC',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (5,'MSCI',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (6,'ERNEST AND YOUNG',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (7,'JOHN DEER',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (8,'Properties@Oklahoma, LLC',null,null,null,null,null);
Insert into COMPANY (COMPANY_ID,COMPANY_NAME,ADDRESS1,ADDRESS2,CITY,STATE,ZIP) values (9,'D.D.T L.L.C.',null,null,null,null,null);
BEGIN
CTX_DDL.CREATE_PREFERENCE ('your_lexer', 'BASIC_LEXER');
CTX_DDL.SET_ATTRIBUTE ('your_lexer', 'SKIPJOINS', '.,@-'''); -- to skip . , @ - ' symbols
END;
CREATE INDEX my_index2 ON COMPANY(COMPANY_NAME)
INDEXTYPE IS CTXSYS.CONTEXT PARALLEL
PARAMETERS ('LEXER your_lexer');
SELECT
company_name
FROM company
WHERE CATSEARCH(company.COMPANY_NAME, 'LLC','') > 0
ORDER BY company.COMPANY_ID;
output
company_name
1 LSG SOLUTIONS LLC
2 Properties@Oklahoma, LLC
only return 2 row but should return 3I just noticed that I forgot to use an empty stoplist, so I have added that to the revised example below. Otherwise, it uses a default stoplist that would not index common single-letter words like A and I.
1. Whtat is Just search on single character 'L'? It give me error.
Since it uses the NEAR operator, searching for just one letter causes incomplete syntax, asking it to search for L near a missing second value. So, I have added additional code to allow for just one letter.
2. How do I do auto refresh on this index on datastore?
If I add "sync (on commit)" it does not refresh the previously set token.
Sync(on commit) does synchronize so that the data is immediately searchable. You have to either optimize or rebuild or drop and recreate the index to condense the rows in the domain index table.
3.lastly explanation of
<seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
<seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
<seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
why 100 true and 100 false
100 is just a default value that I used for the second parameter of near, indicating how close the letters need to be to each other. True and False are values for the third parameter of near, indicating whether or not the letters must be in the same order or not. So, it returns the results in the order of first those that are very close to one another and in the same order, then those that may be further away but in the same order, then those that may be further away and in any order.
SCOTT@orcl12c> CREATE TABLE company_near
2 (company_id NUMBER(10,0) NOT NULL ENABLE,
3 company_name VARCHAR2(50 BYTE))
4 /
Table created.
SCOTT@orcl12c> SET DEFINE OFF
SCOTT@orcl12c> BEGIN
2 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (1,'LSG SOLUTIONS LLC');
3 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (2,'LOVE''S TRAVEL');
4 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (3,'DEVON ENERGY');
5 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (4,'SONIC INC');
6 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (5,'MSCI');
7 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (6,'ERNEST AND YOUNG');
8 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (7,'JOHN DEER');
9 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (8,'Properties@Oklahoma, LLC');
10 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (9,'D.D.T L.L.C.');
11 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (10,'LSG COMPANY, LLC');
12 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (11,'LSG STAFFING, LLC');
13 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (12,'L & S GROUP LLC');
14 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (13,'L S & G, INC.');
15 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (14,'L.S.G. PROPERTIES, L.L.C.');
16 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (15,'LSGS PROPERTIES, LLC');
17 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (16,'LSQ INVESTORS, L.L.C');
18 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (17,'LHP SHERMAN/GRAYSON, LLC');
19 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (18,'Walmart');
20 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (19,'Wal mart');
21 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (20,'LSG Property Investments, L.L.C.');
22 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (21,'1224 S GALVESTON AVE, LLC');
23 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (22,'1527 S GARY AVE, LLC');
24 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (23,'FIFTEENTH STREET GRILL');
25 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (24,'Massa Lobortis LLP');
26 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (25,'Risus A Inc.');
27 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (26,'Dollar $ store');
28 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (27,'L.O.V.E., INC. ');
29 Insert into COMPANY_NEAR (COMPANY_ID,COMPANY_NAME) values (28,'J-MART LLC ');
30 END;
31 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> CREATE OR REPLACE FUNCTION letters_func
2 (p_string IN VARCHAR2)
3 RETURN VARCHAR2
4 AS
5 v_string VARCHAR2(4000);
6 BEGIN
7 FOR i IN 1 .. LENGTH (p_string)
8 LOOP
9 IF REGEXP_LIKE (SUBSTR (p_string, i, 1), '[A-Z]', 'i')
10 THEN
11 v_string := v_string || SUBSTR (p_string, i, 1) || ',';
12 END IF;
13 END LOOP;
14 v_string := RTRIM (v_string, ',');
15 RETURN v_string;
16 END letters_func;
17 /
Function created.
SCOTT@orcl12c> BEGIN
2 CTX_DDL.CREATE_PREFERENCE ('letters_datastore', 'MULTI_COLUMN_DATASTORE');
3 CTX_DDL.SET_ATTRIBUTE
4 ('letters_datastore',
5 'COLUMNS',
6 'letters_func (company_name) company_name');
7 CTX_DDL.SET_ATTRIBUTE ('letters_datastore', 'DELIMITER', 'NEWLINE');
8 END;
9 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> CREATE INDEX letters_index ON company_near (company_name)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS
4 ('DATASTORE letters_datastore
5 STOPLIST CTXSYS.EMPTY_STOPLIST
6 SYNC (ON COMMIT)')
7 /
Index created.
SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
2 /
COUNT(*)
24
1 row selected.
SCOTT@orcl12c> VARIABLE search_string VARCHAR2(100)
SCOTT@orcl12c> EXEC :search_string := 'LSG'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> SELECT SCORE(1), company_id, company_name
2 FROM company_near
3 WHERE CONTAINS
4 (company_name,
5 '<query>
6 <textquery>
7 <progression>
8 <seq>' || :search_string || '</seq>
9 <seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
10 <seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
11 <seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
12 </progression>
13 </textquery>
14 </query>',
15 1) > 0
16 ORDER BY SCORE(1) DESC
17 /
SCORE(1) COMPANY_ID COMPANY_NAME
56 1 LSG SOLUTIONS LLC
56 10 LSG COMPANY, LLC
56 11 LSG STAFFING, LLC
56 12 L & S GROUP LLC
56 13 L S & G, INC.
56 14 L.S.G. PROPERTIES, L.L.C.
56 20 LSG Property Investments, L.L.C.
56 15 LSGS PROPERTIES, LLC
31 17 LHP SHERMAN/GRAYSON, LLC
8 21 1224 S GALVESTON AVE, LLC
4 22 1527 S GARY AVE, LLC
4 23 FIFTEENTH STREET GRILL
12 rows selected.
SCOTT@orcl12c> EXEC :search_string := 'L'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> /
SCORE(1) COMPANY_ID COMPANY_NAME
78 1 LSG SOLUTIONS LLC
77 8 Properties@Oklahoma, LLC
77 9 D.D.T L.L.C.
77 10 LSG COMPANY, LLC
77 11 LSG STAFFING, LLC
77 12 L & S GROUP LLC
77 28 J-MART LLC
77 2 LOVE'S TRAVEL
77 26 Dollar $ store
77 24 Massa Lobortis LLP
77 23 FIFTEENTH STREET GRILL
77 14 L.S.G. PROPERTIES, L.L.C.
77 15 LSGS PROPERTIES, LLC
77 16 LSQ INVESTORS, L.L.C
77 17 LHP SHERMAN/GRAYSON, LLC
77 20 LSG Property Investments, L.L.C.
77 21 1224 S GALVESTON AVE, LLC
77 22 1527 S GARY AVE, LLC
76 19 Wal mart
76 18 Walmart
76 27 L.O.V.E., INC.
76 13 L S & G, INC.
22 rows selected.
SCOTT@orcl12c> INSERT INTO company_near (company_id, company_name) VALUES (30, 'Laris Gordman llc.' )
2 /
1 row created.
SCOTT@orcl12c> COMMIT
2 /
Commit complete.
SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
2 /
COUNT(*)
35
1 row selected.
SCOTT@orcl12c> EXEC :search_string := 'Laris Gordman llc.'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> SELECT SCORE(1), company_id, company_name
2 FROM company_near
3 WHERE CONTAINS
4 (company_name,
5 '<query>
6 <textquery>
7 <progression>
8 <seq>NEAR((' || letters_func (:search_string) || '),1,TRUE)</seq>
9 <seq>NEAR((' || letters_func (:search_string) || '),100,TRUE)</seq>
10 <seq>NEAR((' || letters_func (:search_string) || '),100,FALSE)</seq>
11 </progression>
12 </textquery>
13 </query>',
14 1) > 0
15 ORDER BY SCORE(1) DESC
16 /
SCORE(1) COMPANY_ID COMPANY_NAME
100 30 Laris Gordman llc.
1 row selected.
SCOTT@orcl12c> EXEC CTX_DDL.OPTIMIZE_INDEX ('letters_index', 'FULL')
PL/SQL procedure successfully completed.
SCOTT@orcl12c> SELECT COUNT(*) FROM dr$letters_index$i
2 /
COUNT(*)
24
1 row selected. -
How do I get Oracle Text to index files on a file server?
I am new to Oracle (I'm a MS-SQL DBA looking for a Full-Text Search solution that is better than linking to a MS index server.)
So - Here's the objective:
I have Oracle Server(Express) installed on a Windows server.
I would like for Oracle to build a Full-Text Catalog of the files on a separate file server based on file paths in a table in the database.
(No desire to store terabytes of images and documents inside the database)
I can get Oracle text up and running, using the URL_Datastore:
CREATE TABLE files (id NUMBER PRIMARY KEY, issue_id NUMBER, path VARCHAR(255) UNIQUE, ot_format VARCHAR(6), ot_version VARCHAR(10));
The Compaq server is a remote windows server on my local workgroup, so the fully qualified path is just "compaq" and the URL is valid:
INSERT INTO files VALUES (9,9,'file://Compaq/FTQ/00000003.pdf',NULL,NULL);
INSERT INTO files VALUES (13,13,'file://Compaq/FTQ/01.txt',NULL,NULL);
CREATE INDEX file_index ON files(path) INDEXTYPE IS ctxsys.context
PARAMETERS ('datastore ctxsys.URL_DATASTORE format column ot_format');
but when I enter:
Select * from CTX_User_Index_errors, I see the following errors:
DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/00000003.pdf
DRG-11609: URL store: unable to open local file specified by file://Compaq/FTQ/01.txt
Did I miss something?
Do I need to install anything on the file server?
I would like to convince my company that Oracle can be much quicker than Microsoft's Indexing Service because it can avoid joining two large result sets (one result set from Full_text (indexing service) and one for specific data contained in fields in the MS-SQL database.) Full Text Searches commonly take 40 - 60 seconds where there are 1.5 million multi-page PDF files for a particular set that I sample search on. Without this massive join, I believe I can get the search to run in under 10 seconds.Thank you!
File_Datastore worked fine.
I was staying away from File_Datastore because the information I gathered from googling suggested that file_datastore would only work locally.
Now I just have to get Oracle to pull data out of tables in a MS-SQL database on the local network (don't have a clue yet), and then have it index compiled file paths.
Then MS-SQL can query Oracle with index and full-text criteria and Oracle can send back a result set
It may sound like a bad way of performing Full-Text Queries, but anything will be better than the way things are currently running. We are currently performing Full Text Searches on a table that is rebuilt nightly, so the table containing millions of file paths is not live..
It would be so much better if we just migrated to Oracle, but we currently do not have the resources. -
Error while running the Oracle Text optimize index procedure (even as a dba user too)
Hi Experts,
I am on Oracle on 11.2.0.2 on Linux. I have implemented Oracle Text. My Oracle Text indexes are fragmented but I am getting an error while running the optimize_index error. Following is the error:
begin
ctx_ddl.optimize_index(idx_name=>'ACCESS_T1',optlevel=>'FULL');
end;
ERROR at line 1:
ORA-20000: Oracle Text error:
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 941
ORA-06512: at line 1
Now I tried then to run this as DBA user too and it failed the same way!
begin
ctx_ddl.optimize_index(idx_name=>'BVSCH1.ACCESS_T1',optlevel=>'FULL');
end;
ERROR at line 1:
ORA-20000: Oracle Text error:
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 941
ORA-06512: at line 1
Now CTXAPP role is granted to my schema and still I am getting this error. I will be thankful for the suggestions.
Also one other important observation: We have this issue ONLY in one database and in the other two databases, I don't see any problem at all.
I am unable to figure out what the issue is with this one database!
Thanks,
OrauserNHow about check the following?
Bug 10626728 - CTX_DDL.optimize_index "full" fails with an empty ORA-20000 since 11.2.0.2 upgrade (DOCID 10626728.8) -
Getting error while importing schema with ORACLE TEXT
IMP-00003: ORACLE error 20000 encountered
ORA-20000: Oracle Text error:
DRG-52204: error while registering index
DRG-10507: duplicate index name: WORKORDER_Q, owner: SYS
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.DRIIMP", line 115
ORA-06512: at line 2
IMP-00088: Problem importing metadata for index WORKORDER_Q. Index creation will be skipped
Database version - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
Os version - Linux nlxs1012.slb.atosorigin-asp.com 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
We have take export of schema from production db now importing data to qa environment..
In import facing above error..I am importing objects from P20_MAXIMO to Q25_MAXIMO to another database..
Below is import par file..
USERID='/ as sysdba'
FILE=exp_P20_MAXIMO_C2364781.dmp
LOG=imp_P20_MAXIMO__Q25_MAXIMO_C2364781_1.log
FROMUSER=P20_MAXIMO
TOUSER=Q25_MAXIMO
buffer=1000000
feedback=100000
Export parfile
userid='/ as sysdba'
owner=P20_MAXIMO
FILE=exp_P20_MAXIMO_C2364781.dmp
LOG=exp_P20_MAXIMO_C2364781.log
buffer=10000000
feedback=100000
statistics=none -
Pre-loading Oracle text in memory with Oracle 12c
There is a white paper from Roger Ford that explains how to load the Oracle index in memory : http://www.oracle.com/technetwork/database/enterprise-edition/mem-load-082296.html
In our application, Oracle 12c, we are indexing a big XML field (which is stored as XMLType with storage secure file) with the PATH_SECTION_GROUP. If I don't load the I table (DR$..$I) into memory using the technique explained in the white paper then I cannot have decent performance (and especially not predictable performance, it looks like if the blocks from the TOKEN_INFO columns are not memory then performance can fall sharply)
But after migrating to oracle 12c, I got a different problem, which I can reproduce: when I create the index it is relatively small (as seen with ctx_report.index_size) and by applying the technique from the whitepaper, I can pin the DR$ I table into memory. But as soon as I do a ctx_ddl.optimize_index('Index','REBUILD') the size becomes much bigger and I can't pin the index in memory. Not sure if it is bug or not.
What I found as work-around is to build the index with the following storage options:
ctx_ddl.create_preference('TEST_STO','BASIC_STORAGE');
ctx_ddl.set_attribute ('TEST_STO', 'BIG_IO', 'YES' );
ctx_ddl.set_attribute ('TEST_STO', 'SEPARATE_OFFSETS', 'NO' );
so that the token_info column will be stored in a secure file. Then I can change the storage of that column to put it in the keep buffer cache, and write a procedure to read the LOB so that it will be loaded in the keep cache. The size of the LOB column is more or less the same as when creating the index without the BIG_IO option but it remains constant even after a ctx_dll.optimize_index. The procedure to read the LOB and to load it into the cache is very similar to the loaddollarR procedure from the white paper.
Because of the SDATA section, there is a new DR table (S table) and an IOT on top of it. This is not documented in the white paper (the white paper was written for Oracle 10g). In my case this DR$ S table is much used, and the IOT also, but putting it in the keep cache is not as important as the token_info column of the DR I table. A final note: doing SEPARATE_OFFSETS = 'YES' was very bad in my case, the combined size of the two columns is much bigger than having only the TOKEN_INFO column and both columns are read.
Here is an example on how to reproduce the problem with the size increasing when doing ctx_optimize
1. create the table
drop table test;
CREATE TABLE test
(ID NUMBER(9,0) NOT NULL ENABLE,
XML_DATA XMLTYPE
XMLTYPE COLUMN XML_DATA STORE AS SECUREFILE BINARY XML (tablespace users disable storage in row);
2. insert a few records
insert into test values(1,'<Book><TITLE>Tale of Two Cities</TITLE>It was the best of times.<Author NAME="Charles Dickens"> Born in England in the town, Stratford_Upon_Avon </Author></Book>');
insert into test values(2,'<BOOK><TITLE>The House of Mirth</TITLE>Written in 1905<Author NAME="Edith Wharton"> Wharton was born to George Frederic Jones and Lucretia Stevens Rhinelander in New York City.</Author></BOOK>');
insert into test values(3,'<BOOK><TITLE>Age of innocence</TITLE>She got a prize for it.<Author NAME="Edith Wharton"> Wharton was born to George Frederic Jones and Lucretia Stevens Rhinelander in New York City.</Author></BOOK>');
3. create the text index
drop index i_test;
exec ctx_ddl.create_section_group('TEST_SGP','PATH_SECTION_GROUP');
begin
CTX_DDL.ADD_SDATA_SECTION(group_name => 'TEST_SGP',
section_name => 'SData_02',
tag => 'SData_02',
datatype => 'varchar2');
end;
exec ctx_ddl.create_preference('TEST_STO','BASIC_STORAGE');
exec ctx_ddl.set_attribute('TEST_STO','I_TABLE_CLAUSE','tablespace USERS storage (initial 64K)');
exec ctx_ddl.set_attribute('TEST_STO','I_INDEX_CLAUSE','tablespace USERS storage (initial 64K) compress 2');
exec ctx_ddl.set_attribute ('TEST_STO', 'BIG_IO', 'NO' );
exec ctx_ddl.set_attribute ('TEST_STO', 'SEPARATE_OFFSETS', 'NO' );
create index I_TEST
on TEST (XML_DATA)
indextype is ctxsys.context
parameters('
section group "TEST_SGP"
storage "TEST_STO"
') parallel 2;
4. check the index size
select ctx_report.index_size('I_TEST') from dual;
it says :
TOTALS FOR INDEX TEST.I_TEST
TOTAL BLOCKS ALLOCATED: 104
TOTAL BLOCKS USED: 72
TOTAL BYTES ALLOCATED: 851,968 (832.00 KB)
TOTAL BYTES USED: 589,824 (576.00 KB)
4. optimize the index
exec ctx_ddl.optimize_index('I_TEST','REBUILD');
and now recompute the size, it says
TOTALS FOR INDEX TEST.I_TEST
TOTAL BLOCKS ALLOCATED: 1112
TOTAL BLOCKS USED: 1080
TOTAL BYTES ALLOCATED: 9,109,504 (8.69 MB)
TOTAL BYTES USED: 8,847,360 (8.44 MB)
which shows that it went from 576KB to 8.44MB. With a big index the difference is not so big, but still from 14G to 19G.
5. Workaround: use the BIG_IO option, so that the token_info column of the DR$ I table will be stored in a secure file and the size will stay relatively small. Then you can load this column in the cache using a procedure similar to
alter table DR$I_TEST$I storage (buffer_pool keep);
alter table dr$i_test$i modify lob(token_info) (cache storage (buffer_pool keep));
rem: now we must read the lob so that it will be loaded in the keep buffer pool, use the prccedure below
create or replace procedure loadTokenInfo is
type c_type is ref cursor;
c2 c_type;
s varchar2(2000);
b blob;
buff varchar2(100);
siz number;
off number;
cntr number;
begin
s := 'select token_info from DR$i_test$I';
open c2 for s;
loop
fetch c2 into b;
exit when c2%notfound;
siz := 10;
off := 1;
cntr := 0;
if dbms_lob.getlength(b) > 0 then
begin
loop
dbms_lob.read(b, siz, off, buff);
cntr := cntr + 1;
off := off + 4096;
end loop;
exception when no_data_found then
if cntr > 0 then
dbms_output.put_line('4K chunks fetched: '||cntr);
end if;
end;
end if;
end loop;
end;
Rgds, PierreI have been working a lot on that issue recently, I can give some more info.
First I totally agree with you, I don't like to use the keep_pool and I would love to avoid it. On the other hand, we have a specific use case : 90% of the activity in the DB is done by queuing and dbms_scheduler jobs where response time does not matter. All those processes are probably filling the buffer cache. We have a customer facing application that uses the text index to search the database : performance is critical for them.
What kind of performance do you have with your application ?
In my case, I have learned the hard way that having the index in memory (the DR$I table in fact) is the key : if it is not, then performance is poor. I find it reasonable to pin the DR$I table in memory and if you look at competitors this is what they do. With MongoDB they explicitly says that the index must be in memory. With elasticsearch, they use JVM's that are also in memory. And effectively, if you look at the awr report, you will see that Oracle is continuously accessing the DR$I table, there is a SQL similar to
SELECT /*+ DYNAMIC_SAMPLING(0) INDEX(i) */
TOKEN_FIRST, TOKEN_LAST, TOKEN_COUNT, ROWID
FROM DR$idxname$I
WHERE TOKEN_TEXT = :word AND TOKEN_TYPE = :wtype
ORDER BY TOKEN_TEXT, TOKEN_TYPE, TOKEN_FIRST
which is continuously done.
I think that the algorithm used by Oracle to keep blocks in cache is too complex. A just realized that in 12.1.0.2 (was released last week) there is finally a "killer" functionality, the in-memory parameters, with which you can pin tables or columns in memory with compression, etc. this looks ideal for the text index, I hope that R. Ford will finally update his white paper :-)
But my other problem was that the optimize_index in REBUILD mode caused the DR$I table to double in size : it seems crazy that this was closed as not a bug but it was and I can't do anything about it. It is a bug in my opinion, because the create index command and "alter index rebuild" command both result in a much smaller index, so why would the guys that developped the optimize function (is it another team, using another algorithm ?) make the index two times bigger ?
And for that the track I have been following is to put the index in a 16K tablespace : in this case the space used by the index remains more or less flat (increases but much more reasonably). The difficulty here is to pin the index in memory because the trick of R. Ford was not working anymore.
What worked:
first set the keep_pool to zero and set the db_16k_cache_size to instead. Then change the storage preference to make sure that everything you want to cache (mostly the DR$I) table come in the tablespace with the non-standard block size of 16k.
Then comes the tricky part : the pre-loading of the data in the buffer cache. The problem is that with Oracle 12c, Oracle will use direct_path_read for FTS which basically means that it bypasses the cache and read directory from file to the PGA !!! There is an event to avoid that, I was lucky to find it on a blog (I can't remember which, sorry for the credit).
I ended-up doing that. the events to 10949 is to avoid the direct path reads issue.
alter session set events '10949 trace name context forever, level 1';
alter table DR#idxname0001$I cache;
alter table DR#idxname0002$I cache;
alter table DR#idxname0003$I cache;
SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT), SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0001$I;
SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT), SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0002$I;
SELECT /*+ FULL(ITAB) CACHE(ITAB) */ SUM(TOKEN_COUNT), SUM(LENGTH(TOKEN_INFO)) FROM DR#idxname0003$I;
SELECT /*+ INDEX(ITAB) CACHE(ITAB) */ SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0001$I ITAB;
SELECT /*+ INDEX(ITAB) CACHE(ITAB) */ SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0002$I ITAB;
SELECT /*+ INDEX(ITAB) CACHE(ITAB) */ SUM(LENGTH(TOKEN_TEXT)) FROM DR#idxname0003$I ITAB;
It worked. With a big relief I expected to take some time out, but there was a last surprise. The command
exec ctx_ddl.optimize_index(idx_name=>'idxname',part_name=>'partname',optlevel=>'REBUILD');
gqve the following
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drftoptrebxch
ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 1141
ORA-06512: at line 1
Which is very much exactly described in a metalink note 1645634.1 but in the case of a non-partitioned index. The work-around given seemed very logical but it did not work in the case of a partitioned index. After experimenting, I found out that the bug occurs when the partitioned index is created with dbms_pclxutil.build_part_index procedure (this enables enables intra-partition parallelism in the index creation process). This is a very annoying and stupid bug, maybe there is a work-around, but did not find it on metalink
Other points of attention with the text index creation (stuff that surprised me at first !) ;
- if you use the dbms_pclxutil package, then the ctx_output logging does not work, because the index is created immediately and then populated in the background via dbms_jobs.
- this in combination with the fact that if you are on a RAC, you won't see any activity on the box can be very frightening : this is because oracle can choose to start the workers on the other node.
I understand much better how the text indexing works, I think it is a great technology which can scale via partitioning. But like always the design of the application is crucial, most of our problems come from the fact that we did not choose the right sectioning (we choosed PATH_SECTION_GROUP while XML_SECTION_GROUP is so much better IMO). Maybe later I can convince the dev to change the sectionining, especially because SDATA and MDATA section are not supported with PATCH_SECTION_GROUP (although it seems to work, even though we had one occurence of a bad result linked to the existence of SDATA in the index definition). Also the whole problematic of mixed structured/unstructured searches is completly tackled if one use XML_SECTION_GROUP with MDATA/SDATA (but of course the app was written for Oracle 10...)
Regards, Pierre -
Suggestion: Oracle text CONTEXT index on one or more columns ?
Hi,
I'm implementing Oracle text using CONTEXT ..... and would like to ask you for performance suggestion ...
I have a table of Articles .... with columns .. TITLE, SUBTITLE , BODY ...
Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
and then use CONTAINS(FULLTEXT,'...')>0
Or is it almost the same for oracle if i put indexes on all three columns and then call:
CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0
I actually don't care if the result is a match in TITLE OR SUBTITLE OR BODY ....
So if i move into some FULLTEXT column, then i have duplicate data in a article row ... but if i create indexes for each column, than oracle has 2x more to index,optimize and search ... am I wright ?
Table has 1.8mil records ...
Thank you.
Krismackrispi wrote:
Now is it better from performance point of view to move all three columns into one dummy column ... with name like FULLTEXT ... and put index on this single column,
and then use CONTAINS(FULLTEXT,'...')>0What version of Oracle are you on? If 11 then you could use a virtual column to do this, otherwise you'd have to write code to maintain the column which can get messy.
mackrispi wrote:
Or is it almost the same for oracle if i put indexes on all three columns and then call:
CONTAINS(TITLE,'...')>0 OR CONTAINS(SUBTITLE,'...')>0 OR CONTAINS(BODY,'...')>0Benchmark it and find out :)
Another option would be something like this.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9455353124561
Were i you, i would try out those 3 approaches and see which meet your performance requirements and weigh that with the ease of implementation and administration. -
database version 11.2.0.4
rac two node
CREATE INDEX MAXIMO.ACTCI_NDX3 ON MAXIMO.ACTCI
(DESCRIPTION)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('lexer global_lexer language column LANGCODE')
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: global_lexer
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366Like the error message says, you don't have a global_lexer. So, you need to create a global_lexer and that lexer must have at least a default sub_lexer, then you can use that global_lexer in your index parameters. Please see the demonstration below, including reproduction of the error and solution.
SCOTT@orcl12c> -- reproduction of problem:
SCOTT@orcl12c> CREATE TABLE actci
2 (description VARCHAR2(60),
3 langcode VARCHAR2(30))
4 /
Table created.
SCOTT@orcl12c> CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS('lexer global_lexer language column LANGCODE')
4 /
CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: global_lexer
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 366
SCOTT@orcl12c> -- solution:
SCOTT@orcl12c> DROP INDEX actci_ndx3
2 /
Index dropped.
SCOTT@orcl12c> BEGIN
2 CTX_DDL.CREATE_PREFERENCE ('global_lexer', 'multi_lexer');
3 CTX_DDL.CREATE_PREFERENCE ('english_lexer', 'basic_lexer');
4 CTX_DDL.ADD_SUB_LEXER ('global_lexer', 'default', 'english_lexer');
5 END;
6 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> CREATE INDEX ACTCI_NDX3 ON ACTCI (DESCRIPTION)
2 INDEXTYPE IS CTXSYS.CONTEXT
3 PARAMETERS('lexer global_lexer language column LANGCODE')
4 /
Index created. -
Upgrading Oracle Text - Post upgrade step 10.2 to 11.2
I already upgraded my 10.2.0.4 database to 11.2.0.1 and have to do post upgrade steps. In step 39 of Manual guideline (837570.1) is not clear for me. If some one can explain further would be appriciated. When i check my source ORACLE_HOME/ctx/admin/ctxf102.txt or ctxf102.sql
Step 39
Upgrading Oracle Text
Copy the following files from the previous Oracle home to the new Oracle home:
* Stemming user-dictionary files
* User-modified KOREAN_MORPH_LEXER dictionary files
* USER_FILTER executables
To obtain a list of the above files, use:
$ORACLE_HOME/ctx/admin/ctxf<version>.txt
$ORACLE_HOME/ctx/admin/ctxf<version>.sql
where version is 920,101,102
For instance, if upgrading from 10.2.0
*1. For dictionary files check*
*$ORACLE_HOME/ctx/admin/ctxf102.txt*
*2. Execute the script as database user SYS,SYSTEM, or CTXSYS*
*$ORACLE_HOME/ctx/admin/ctxf102.sql*
If your Oracle Text index uses KOREAN_LEXER which was deprecated in Oracle 9i and desupported in Oracle 10g Release 2, see below Note for further information on manual migration from KOREAN_LEXER to KOREAN_MORPH_LEXER.
Note 300172.1 Obsolescence of KOREAN_LEXER Lexer TypeHi Srini
Thank you very much. now i got it.
Oracle asked me to identify the CTXCAT indexes with KOREAN_LEXER execute the following query as user CTXSYS: if nothing return then i can skip this step.
SELECT idx_name
FROM ctxsys.ctx_indexes
WHERE idx_type = 'CTXCAT'
AND idx_name IN
(SELECT ixo_index_name
FROM ctxsys.ctx_index_objects
WHERE ixo_class = 'LEXER'
AND ixo_object = 'KOREAN_MORPH_LEXER ');
SELECT isl_index_owner,isl_index_name,isl_language
FROM CTXSYS.ctx_index_sub_lexers
WHERE isl_object = 'KOREAN_MORPH_LEXER'; -
Hi,
from what I've read about it, the following has to be done.
e.g. CREATE index ticket_keywords_index ON ticket(keywords) indextype IS ctxsys.context;
CREATE index ticket_solution_index ON ticket(solution) indextype IS ctxsys.context;
SELECT * from ticket where ctxsys.contain(:P12Value_to_find);
But I wonder, how does it know on which index it has to look ?
Is there anyway to specify on what it should look ?
If yes, any idea how one goes on about that ?
If no, any idea how to avoid getting information from the two columns back, if one only needs one ?
Could it in a way be done, by adding a column in apex, that allows to put in a checkbox, at the top, to say include this column in the search, or not, or is this not the good way to do so ?
Or am i missing a point ?
Thanks for the help,
FlorisFloris,
Your query should be of the form:
SELECT *
FROM ticket
WHERE contains(indexed_col,:P12_VALUE_TO_FIND) > 0Where indexed_col is the name of the column on which you have built your Oracle Text index and :P12_VALUE_TO_FIND is the page item that contains the Search String.
Andy
http://atulley.wordpress.com/ -
Using Oracle Text in Oracle XML DB .
Hi all ,
The idea is simple ,i need to index all stored files in Oracle XML DB and the index should stay in Oracle DB . Using some 3 party index software is also possible but you need to write a mapping to move the index file in Oracle DB .
So i thought of using Oracle Text but i am not sure about how to retrieve such a document from Oracle XML DB , let me say over ftp or http ? . And if these documents are password protected -> how can Oracle Text allow this ?[11gR2 XMLDB Developers Guide -- Full-Text Search over XML Data|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb09sea.htm#i1006756] would be the first place to start.
For document display, there a bunch of potential solutions, you can look at [XML DB Repository|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10492/xdb03usg.htm#insertedID18], or the Text Application Developers Guide [Presenting Documents in Oracle Text|http://download.oracle.com/docs/cd/B28359_01/text.111/b28303/view.htm#i1006687] .
Password protected documents can't be indexed using the auto_filter.
Maybe you are looking for
-
Mini display port to dvi or vga adaptor?
I currently use a MacBook Pro and want to use the mini display port to my 24 inch Samsung LCD screen. My question is should I use the mini display port to DVI or VGA? My Monitor has both ports on back. I know that DVI is Digital and suppose to be the
-
IPOD starts syncing then gets a variety of errors
when i plug my ipod in and try and sync it starts then stops with a variety of error messages ive had everything from 'the disk cannot be read' to 'an unknow error has occurred' etc. this has only been happening since i uploaded some files to transfe
-
Sample and sample instrument folder
hi all, I'm asking some basic question, but wish can get some help!!! First, i want to move all the jam pack to an external audio disk. i understand logic can locate automatic when i drag the loops in loops browser. But my main question is how about
-
Find a link to download oracle 10gR2 Clusterware win32
I want to find a link to download oracle 10gR2 Clusterware win32, please
-
Deploying the JRA for the Mobile Administrator
Hi All, I am trying to Deploy the JRA for the Mobile Administrator below is the procedure as per document Procedure 1. Start the deploy tool (see Getting Started [External]). 2. Create a new project and name it. 3. Switch to the Deployer tab page. 4.