Oracle Text - CTX Context Index Soundex Problem
Hi,
I'm running into a problem with Oracle Text when searching using the ! (soundex) option. I've created a simple test example to highlight the issue.
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
Windows 2008 Server 64-bit
create table test_tab (test_col varchar2(200));
insert all
into test_tab (test_col) values ('ab-tönes')
into test_tab (test_col) values ('ab-tones')
into test_tab (test_col) values ('abtones')
into test_tab (test_col) values ('ab tones')
into test_tab (test_col) values ('ab-tanes')
select * from dual
select * from test_tab
begin
ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+&''');
ctx_ddl.set_attribute('test_lex1','base_letter','YES');
-- ctx_ddl.set_attribute('test_lex1','skipjoins','-');
end;
create index test_idx on test_tab (test_col)
indextype is ctxsys.context
parameters
('lexer test_lex1'
select token_text from dr$test_idx$i;
TOKEN_TEXT
AB
ABTONES
TANES
TONES
select * from test_tab where contains (test_col, '!ab tones') > 0;
TEST_COL
ab-tönes
ab-tones
ab tones
select * from test_tab where soundex(test_col) = soundex('ab tones');
TEST_COL
ab-tönes
ab-tones
abtones
ab tones
ab-tanes
So my question is, can anyone suggest an approach whereby I can get the Oracle Text Context index (or CTXCAT index if it's more appropriate) to return all 5 rows like the simple Soundex is doing?
I can't really use soundex as this search query will form part of a search screen for a multi-language application. Soundex is limited to English sounding words, so I need the solution to be able to compare strings that may not "sound" English.
It must be an attribute of the BASIC_LEXER, and I've tried skipjoins, start/end-joins, stop lists, but I just cannot get the Soundex feature of Oracle Text to function like the SOUNDEX() function!
Looking at how the tokens are stored dr$test_idx$i I need Oracle Text to almost concat 'AB' and 'TONES' to search as a single string.
Any help greatly appreciated.
Thanks,
I am not getting the same problem that you are getting with the umlat, but I don't see what is different. Please post the result of:
select ctx_report.create_index_script ('test_idx') from dual;
Here are the results on my system. Perhaps you can spot the difference. I added an empty_stoplist, so that it won't print out a long list of stopwords.
SCOTT@orcl12c> create table test_tab (test_col varchar2(200))
2 /
Table created.
SCOTT@orcl12c> insert all
2 into test_tab (test_col) values ('ab-tönes')
3 into test_tab (test_col) values ('ab-tones')
4 into test_tab (test_col) values ('abtones')
5 into test_tab (test_col) values ('ab tones')
6 into test_tab (test_col) values ('ab-tanes')
7 select * from dual
8 /
5 rows created.
SCOTT@orcl12c> select * from test_tab
2 /
TEST_COL
ab-tönes
ab-tones
abtones
ab tones
ab-tanes
5 rows selected.
SCOTT@orcl12c> begin
2 ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
3 ctx_ddl.set_attribute('test_lex1','base_letter','YES');
4 end;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> create or replace procedure test_proc
2 (p_rowid in rowid,
3 p_clob in out nocopy clob)
4 as
5 begin
6 select replace (translate (test_col, '/\|-_+&''', ' '), ' ', '')
7 into p_clob
8 from test_tab
9 where rowid = p_rowid;
10 end test_proc;
11 /
Procedure created.
SCOTT@orcl12c> show errors
No errors.
SCOTT@orcl12c> begin
2 ctx_ddl.create_preference ('test_ds', 'user_datastore');
3 ctx_ddl.set_attribute ('test_ds', 'procedure', 'test_proc');
4 end;
5 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> create index test_idx on test_tab (test_col)
2 indextype is ctxsys.context
3 parameters
4 ('lexer test_lex1
5 datastore test_ds
6 stoplist ctxsys.empty_stoplist')
7 /
Index created.
SCOTT@orcl12c> select token_text from dr$test_idx$i
2 /
TOKEN_TEXT
ABTANES
ABTONES
2 rows selected.
SCOTT@orcl12c> variable search_string varchar2(100)
SCOTT@orcl12c> exec :search_string := 'ab tones'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> select * from test_tab
2 where contains
3 (test_col,
4 '!' || replace (:search_string, ' ', ' !') ||
5 ' or !' || replace (:search_string, ' ', '')) > 0
6 /
TEST_COL
ab-tönes
ab-tones
abtones
ab tones
ab-tanes
5 rows selected.
SCOTT@orcl12c> exec :search_string := 'abtones'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> /
TEST_COL
ab-tönes
ab-tones
abtones
ab tones
ab-tanes
5 rows selected.
SCOTT@orcl12c> exec :search_string := 'ab tönes'
PL/SQL procedure successfully completed.
SCOTT@orcl12c> /
TEST_COL
ab-tönes
ab-tones
abtones
ab tones
ab-tanes
5 rows selected.
SCOTT@orcl12c> select ctx_report.create_index_script ('test_idx') from dual
2 /
CTX_REPORT.CREATE_INDEX_SCRIPT('TEST_IDX')
begin
ctx_ddl.create_preference('"TEST_IDX_DST"','USER_DATASTORE');
ctx_ddl.set_attribute('"TEST_IDX_DST"','PROCEDURE','"SCOTT"."TEST_PROC"');
end;
begin
ctx_ddl.create_preference('"TEST_IDX_FIL"','NULL_FILTER');
end;
begin
ctx_ddl.create_section_group('"TEST_IDX_SGP"','NULL_SECTION_GROUP');
end;
begin
ctx_ddl.create_preference('"TEST_IDX_LEX"','BASIC_LEXER');
ctx_ddl.set_attribute('"TEST_IDX_LEX"','BASE_LETTER','YES');
end;
begin
ctx_ddl.create_preference('"TEST_IDX_WDL"','BASIC_WORDLIST');
ctx_ddl.set_attribute('"TEST_IDX_WDL"','STEMMER','ENGLISH');
ctx_ddl.set_attribute('"TEST_IDX_WDL"','FUZZY_MATCH','GENERIC');
end;
begin
ctx_ddl.create_stoplist('"TEST_IDX_SPL"','BASIC_STOPLIST');
end;
begin
ctx_ddl.create_preference('"TEST_IDX_STO"','BASIC_STORAGE');
ctx_ddl.set_attribute('"TEST_IDX_STO"','R_TABLE_CLAUSE','lob (data) store as (
cache)');
ctx_ddl.set_attribute('"TEST_IDX_STO"','I_INDEX_CLAUSE','compress 2');
end;
begin
ctx_output.start_log('TEST_IDX_LOG');
end;
create index "SCOTT"."TEST_IDX"
on "SCOTT"."TEST_TAB"
("TEST_COL")
indextype is ctxsys.context
parameters('
datastore "TEST_IDX_DST"
filter "TEST_IDX_FIL"
section group "TEST_IDX_SGP"
lexer "TEST_IDX_LEX"
wordlist "TEST_IDX_WDL"
stoplist "TEST_IDX_SPL"
storage "TEST_IDX_STO"
begin
ctx_output.end_log;
end;
1 row selected.
Similar Messages
-
Oracle 9.2 ConText index alternate_spelling problem
Hello everybody!
I'm having problems with a ConText index in Oracle 9.2, using the alternative_spelling parameter...
Here is my code
CREATE TABLE U2000P.TEST_FICHIER_INT
(ID NUMBER(6) NOT NULL,
NOM_FICHIER VARCHAR2(90) NULL,
MIME VARCHAR2(90) NULL,
FICHIER BLOB DEFAULT empty_blob(),
LNG VARCHAR2(3) NULL,
KEY_WORDS VARCHAR2(500) NULL,
CONSTRAINT PK_TEST_FICHIER_INT PRIMARY KEY (ID)
EXECUTE CTX_DDL.CREATE_PREFERENCE('ENGLISH_LEXER','BASIC_LEXER');
EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'INDEX_THEMES', 'YES');
EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'THEME_LANGUAGE', 'ENGLISH');
EXECUTE CTX_DDL.SET_ATTRIBUTE('ENGLISH_LEXER', 'BASE_LETTER', 'NO');
EXECUTE CTX_DDL.CREATE_PREFERENCE('FRENCH_LEXER','BASIC_LEXER');
EXECUTE CTX_DDL.SET_ATTRIBUTE('FRENCH_LEXER', 'INDEX_THEMES', 'NO');
EXECUTE CTX_DDL.SET_ATTRIBUTE('FRENCH_LEXER', 'BASE_LETTER', 'NO');
EXECUTE CTX_DDL.CREATE_PREFERENCE('GERMAN_LEXER','BASIC_LEXER');
EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'INDEX_THEMES', 'NO');
EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'BASE_LETTER', 'NO');
EXECUTE CTX_DDL.SET_ATTRIBUTE('GERMAN_LEXER', 'ALTERNATE_SPELLING', 'GERMAN');
EXECUTE CTX_DDL.CREATE_PREFERENCE('GLOBAL_LEXER','MULTI_LEXER');
EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'FRENCH', 'FRENCH_LEXER', '1');
EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'DEFAULT', 'GERMAN_LEXER');
EXECUTE CTX_DDL.ADD_SUB_LEXER('GLOBAL_LEXER', 'ENGLISH', 'ENGLISH_LEXER', '5');
CREATE INDEX IDX_F_TEST_FICHIER_INT
ON TEST_FICHIER_INT(FICHIER)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('DATASTORE CTXSYS.DIRECT_DATASTORE
FILTER CTXSYS.INSO_FILTER
LEXER GLOBAL_LEXER LANGUAGE COLUMN LNG');
In one of the files that I load, I have the word 'paläontologie'
Here are my searches
select nom_fichier, score(1) from test_fichier_int where contains(fichier, 'paläontologie', 1) > 0;
-> no rows selected
select nom_fichier, score(1) from test_fichier_int where contains(fichier, 'palaontologie', 1) > 0;
-> Finds my document
Why does the first search not work?
If I don't use the 'alternate_spelling' parameter, both searches don't work, why is that???
Thanks in advance for your help
Best regards
Neil.I found my error!!!! Thanks Neil... lol
In fact, it's my SQL*Plus that must be badly configured, and I am having problems with accentuated characters... If I search through a browser, it works!!!
Sorry about that...
Best regards
Neil. -
Oracle Text, multi_column_datastore describe index
Referring to Re: Oracle Text, ctxsys.context problem with number column
In TOAD or SQL Navigator you can click on some object (like table, index) and click on tab "script" where is generated the code to create it.
Assuming that I am a person who sees the index for the first time where/how I can find multi_columns/parameters with which the index was created ?
For example:
exec ctx_ddl.drop_preference( 'myds' );
exec ctx_ddl.create_preference( 'myds', 'MULTI_COLUMN_DATASTORE' );
exec ctx_ddl.set_attribute( 'myds', 'COLUMNS', 'item_barcode, item_title, item_subtitle' );
CREATE INDEX i_index_test
ON item (item_title)
INDEXTYPE IS ctxsys.context
PARAMETERS ( 'datastore myds' );And script says:
CREATE INDEX PLSQL.I_INDEX_TEST ON PLSQL.ITEM
(ITEM_TITLE)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('datastore myds')
NOPARALLEL;
Where I can find datastore "myds" ?You can use ctx_report to get all the information about an index.
I use it from SQL*Plus like this:
set pagesize 0
set heading off
set trimspool on
set long 500000
spool index.sql
select ctx_report.create_index_script('MyIndexName') from dual;
spool offThe only thing this won't give you is the source for any procedures used in the user_datastore. You can get that from user_sources. -
Oracle Text, ctxsys.context problem with number column
Hi,
DB 11.2.0.3
Is there any solution to create ctxsys.context index on number column ? Or I have to create other index type ?
When I try do that (create ctxsys.context index), I get
09:01:18 ORA-29855: wystąpił błąd przy wykonywaniu podprogramu ODCIINDEXCREATE (An error has occurred in the performance of the subprogram)
09:01:18 ORA-20000: Oracle Text - błąd: (- error:)
09:01:18 DRG-10509: niepoprawna kolumna tekstowa: ITEM_TYPE (invalid text column:)
09:01:18 ORA-06512: przy "CTXSYS.DRUE", linia 160
09:01:18 ORA-06512: przy "CTXSYS.TEXTINDEXMETHODS", linia 366Btw, is there possible to search like "*LIKE %123%*" clause any of index (in contains) ?
Edited by: Ndejo on 2012-11-21 00:53The multi_column_datastore says that the text to be indexed should be fetched from the supplied COLUMNS list rather than from the actual column the index is created on.
So in this case we're fetching the contents of "theNumber" column, converting it to text, and indexing it.
You don't necessarily need a dummy column, if "a_title" is a varchar column you could create the index on that instead.
For example:
SQL> create table mytab( a_id number, a_code number, a_title varchar2(80), a_subtitle varchar2(80), a_info clob );
Table created.
SQL> insert into mytab values ( 12, 9812376, 'foo is the title',
2 'foobar is the subtitle', 'the info column will not be indexed' );
1 row created.
SQL> exec ctx_ddl.drop_preference( 'myds' )
PL/SQL procedure successfully completed.
SQL> exec ctx_ddl.create_preference( 'myds', 'MULTI_COLUMN_DATASTORE' )
PL/SQL procedure successfully completed.
SQL> exec ctx_ddl.set_attribute( 'myds', 'COLUMNS', 'a_code, a_title, a_subtitle' )
PL/SQL procedure successfully completed.
SQL> create index myindex on mytab (a_title) indextype is ctxsys.context
2 parameters ('datastore myds');
Index created.
SQL> select a_id from mytab where contains (a_title, '%123%') > 0;
A_ID
12
SQL> select a_id from mytab where contains (a_title, 'foo') > 0;
A_ID
12If you want to be able to search within a particular column, then add "section group CTXSYS.AUTO_SECTION_GROUP" to the parameters clause, and you can then do:
SQL> select a_id from mytab where contains (a_title, 'foobar WITHIN a_subtitle') > 0;
A_ID
12 -
Oracle Text location of Indexes
I am creating an Oracle Text index as per example given in documentation. I have set my storage preferences to point all the created tables / indexes to a given tablespace. This works fine, however I still get one index (domain) being created in the SYSTEM tablespace. Is this normal ? Can it be moved ?
The command used is
create index abstract_text_idx on abstracts(merge_text)
indextype is ctxsys.context
parameters('lexer abstract_lexer storage abstract_store memory 52428800')
The index left in SYSTEM tablespace is ABSTRACT_TEXT_IDX. All the DR$$ indexes have used the storage parameters in the abstract_store preference O.K. -
Oracle Text - procedure refreshing index doesn't run
Hi,
I'm experiencing problems refreshing an index using a procedure (see below). When running the command instead of the procedure everything is fine.
Reading through this forum I found that ctxapp role is needed, which I have. Since this didn't work the admin granted execute privileges on any procedures and programmes (for a short test). Even that didn't help.
The admin can run the procedure without any problems.
Help appreciated
Franziska
---The procedure---
create or replace procedure indizes_erneuern
as
begin
ctx_ddl.optimize_index('ind_nachname_assistent', 'REBUILD');
end;---The error message
Connecting to the database FAM.
ORA-20000: Oracle Text error:
ORA-01031: insufficient privileges
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.CTX_DDL", line 630
ORA-06512: at "FAM.INDIZES_ERNEUERN", line 4
ORA-06512: at line 2
Process exited.
Disconnecting from the database FAM.When running the command instead of the procedureYou'll have to either issue direct grants or define the procedure with AUTHID CURRENT_USER.
-
Oracle Text -- ctxsys.context
Hi
We are creating a oracle text index on one table . The table contains 200 million records
The script is failing in the middle by giving the error unable to extend temp segement by 128 in temp table space.
Can you please provide any suggestions of how this issue can be rectified.
Also Can we use nosort option with text indexes.
Regards
RamakrishnaAre you using automatic PGA work area sizing?
You could switch to manual for this session and override sort_area_size.
Also, memory parameters of index can be changed.
See:
http://download.oracle.com/docs/cd/E11882_01/text.112/e16594/aoptim.htm#i1006756 -
Oracle text catsearch sub index query
Hello,
I wonder if you can help me with a query about Oracle Text Catsearch.
I have a database which has 10Gb of data.
There is a text column in the database on which I have to find a partial match on the data contained in it
I have indexed this column with a CTXSYS.CTXCAT index.
In addition I have added a sub index to the index set for a Date Field and ran EXEC DBMS_STATS.GATHER_TABLE_STATS to make sure the query execution path is optimised
Here's my Question:
How can I make sure that the Date sub query always runs before the finding the Partial Match on the text column?
Caveat I am a programmer not a DBA, but I've ended up doing some databasey type stuff, apologies if question is thick.
Cheers
Mark
p.s. Performance is good, but I have a feeling that the Date subquery is not being used as efficiently as it should be (the subquery should massively reduce the result set to be searched for the partial match)You can't - ctxcat doesn't support the "functional invocation" which would be needed if another index is used first. So reducing the set of docs to index doesn't help.
If you can find a way to denormalize the information used in the sub-query such that it can be included in the main query index set, that should help performance considerably. -
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. -
Problem with blob column index created using Oracle Text.
Hi,
I'm running Oracle Database 10g 10.2.0.1.0 standard edition one, on windows server 2003 R2 x64.
I have a table with a blob column which contains pdf document.
Then, I create an index using the following script so that I can do fulltext search using Oracle Text.
CREATE INDEX DMCS.T_DMCS_FILE_DF_FILE_IDX ON DMCS.T_DMCS_FILE
(DF_FILE)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('DATASTORE CTXSYS.DEFAULT_DATASTORE');
However, the index is not searchable and I check the following tables created by database for my index and found them to be empty as well !!
DR$T_DMCS_FILE_DF_FILE_IDX$I
DR$T_DMCS_FILE_DF_FILE_IDX$K
DR$T_DMCS_FILE_DF_FILE_IDX$N
DR$T_DMCS_FILE_DF_FILE_IDX$R
I wonder what's wrong with it.
My user has been granted the ctx_app role and I have other tables that store plain text which I use Oracle Text are fine. I even output the blob column and save as pdf file and they are fine.
However the database seems like not indexing my blob column although the index can be created without error.
Please advise.
Really appreciate anyone who can help.
Thank you.The situation is I have already loaded a few pdf document into the table's blob column.
After I create the Oracle text index on this blob column, I find the system generated index tables listed in my earlier posting are empty, except for the 4th table.
Normally we'll see words inside the table where those are the words indexed by oracle text on my document.
As a result, no matter how i search for the index using select statement with contains operator, it will not give me any result.
I feel weird why the blob is not indexed. The content of the blob are actually valid because I tested this by export the content back to pdf and I can still view and search within the pdf.
Regards,
Jap. -
Problem creating Oracle text index
Hi,
I am trying to create an index in Oracle 9i using Oracle Text.
First i gave this grant as SYSDBA:
"GRANT ALL ON CTX_DDL TO <USERNAME>"
Then i executed the following :
EXECUTE CTX_DDL.CREATE_SECTION_GROUP('MYPATHGROUP','PATH_SECTION_GROUP');
CREATE INDEX SDS_SLIDE_XML_IDX ON SDS_SLIDE_DATA (SLIDE_XML)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('SECTION GROUP MYPATHGROUP');
but I got the following error :
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in dricon.get_primary_key
ORA-00980: synonym translation is no longer valid
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 186
Any ideas?
Rgds
Vikram.Oracle Text will not index the content inside the portlet of the pages. The portlet is treated as a portlet instance item and only the relevant attributes are searched for, like display name of the portlet, etc.
-
Oracle text installed but can't find anything through the text indexes
Hello,
i've got a Oracle 10G (10.2.0.4) database 64bit on a Windows 2003r2 64bit (sp2). I also installed the Oracle Text:
Oracle Text
VALID 10.2.0.4.0
then I created some preferences and created the text indexes:
create index afindex on docs(document) indextype is ctxsys.context parameters('storage gdoc_store SYNC (ON COMMIT)');
so with the syn on commit, it should immediately be seen in the index.
I have for example in 1 table 6 documents (word,pdf ...), the other has more then 64000 documents and the 3rd one more than 425000.
In none of the 3 above, searching on text gives result after index is created. Not in the developer his program nor in sqlplus.
searching sql for example:
select id from docs where contains(doc,'hello')>0;
under the c:\windows\temp, I see about 380files with drgibXXXXX, so it does index them?
What could be the problem?
note that I've got lots of other database where I also use Oracle text and there is no problem, only difference is the 32 <-> 64bit.
error in ctx_index_error is :
DRG-11207: user filter command exited with status 1
Edited by: user12155961 on 15-apr-2010 5:33According to the [http://download.oracle.com/docs/cd/B19306_01/text.102/b14218/afilsupt.htm#sthref2446|10.2 docs], Auto Filter is supported on the following platforms:
Microsoft Windows
o Server 2003 (x86 and IA-64)
o XP (Service Packs 1 and 2)
o 2000 x86 (Service Pack 2)
o NT 4.0 x86 (Intel) (Service Pack 6a)
Sun Solaris 8.0 and 9.0
HP-UX 11.0 and 11i, PA-RISC
HP-UX 11i v11.23, IA-64
IBM AIX 5.1 and 5.2L
Red Hat Linux 7.3 and 8.0
Red Hat Enterprise Linux AS 2.1 and 3.0 (x86)
Red Hat Enterprise Linux AS 3.0 (IA-64)
SuSE Linux Standard Server 8 (x86)
Note x84 and IA-64 (Itanium 64) but not x86-64. So I suspect that you don't get the filters at all.
If this is the case, your options are either to install a 32 bit version of Oracle for Windows (which I believe should work fine on 64 bit Windows) or to attempt to cobble the 32 bit ctxhx into your 64 bit environment. I'm sure this should be possible, but it would be unsupported and I don't have any kind of "how to" on doing it. -
Oracle Text Help with XML column values
Hello. In addition to being new to Oracle Text, I am inheriting an Oracle Text application and have a couple of questions.
First, A context-based index has been set-up on a CLOB column which contains an XML formatted document. The Auto Section Group parameter has been set to created zones for each tag of the XML document. I have found that when using a browser to display the content of the CLOB, some of the column values have trouble displaying in the browser, where I receive an XML processing error. I believe this is due to the fact that some of the XML document rows contain URLs that are not embedded in the CDATA tag. In any case, if the browser has trouble displaying the XML, will oracle text have trouble indexing the XML and creating the section group zones?
Second, I understand that the NOT operator takes a right operand term and left operand term. Can either of the terms be the results of the WITHIN operator, i.e. "dogs not (cats within animals)".
Thank you.I bet you just whipped that out, and I thank you with all my
heart, its amazing to me how many ways I tried to do what you did.
Thanks
I have a second question relating to the same problem and
that is in referencing the over state. Currently, I can write
'text' into the text field and see what I have coming in from xml
in its place during the 'up' state.
However, when the timeline hits the 'over' state, the
textfield will display nothing, or 'text' if I have that written
in. I suspect that I am not referencing the'over' state correctly.
Should I add one line of code sort of referencing the text
field and not just the button while in the over state? -
Oracle Text search returning no results
Hi,
I have created an oracle text (ctxsys.context) on a BLOB column which has various documents of .doc,.docx,.pdf, types.
CREATE INDEX IND_RESUME_DETAILS ON RESUME_DETAILS (RESUME)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS ('datastore ctxsys.default_datastore filter ctxsys.inso_filter sync (on commit)')
However, the query using 'Contains' does not return any search results.
select employee_number,Score(1) from resume_details where CONTAINS(RESUME,'JAVA',1)>0 order by score(1) desc
On checking the 'ctx_user_index_errors' view , it has an entry for every row in the table. However, it does not show any error in the err_text column
ERR_INDEX_NAME
ERR_TIMESTAMP
ERR_TEXTKEY
ERR_TEXT
IND_RESUME_DETAILS
5/8/2014 18:27
AAAl0GAAGAAEFoWAAC
IND_RESUME_DETAILS
5/8/2014 18:27
AAAl0GAAGAAEFoWAAD
IND_RESUME_DETAILS
5/8/2014 18:27
AAAl0GAAGAAEFoWAAE
Even the index status shows 'VALID'.
I tried dropping and recreating indexes, dropping and recreating the table.. However, it's not working at all.
What's surprising is,it used to work earlier without any problems.
I also have another context index on another column on the same table which is a varchar2 column. The search on that column works absolutely fine.
The database version is
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
Request someone in helping me root cause this issue. Any help is appreciated.
ThanksHi Barbara,
Still the same issue.
Its putting an entry into 'ctx_user_index_errors' but with nothing in the err_text column..Hence, difficult to track what or where the problem lies.
And moreover, the same index was working earlier. Just stopped working all of a sudden. -
CONTEXT INDEX TABLE에 대한 PARAMETER 설정하는 방법
제품 : ORACLE SERVER
작성날짜 : 2002-04-12
CONTEXT INDEX TABLE에 대한 PARAMETER 설정하는 방법
==================================================
Purpose
Oracle7.3과 Oracle8.0의 context option에서 index table의
storage parameter를 설정하는 방법을 알아보자.
Explanation
1. ConText Index Table과 Index
Context option 에서는 text column에 대한 Context Index Table과
그 테이블에 대한 Index를 생성한다. 이 table과 index는
ctx_ddl.create_index procedure를 통해 자동으로 만들어지는 데,
생성시에 이들 table과 index에 대한 tablespace, storage clause,
pctfree등의 parameter에 대해 설정할 수가 없고 이런 정보를 가진
preference 를 생성하여 policy를 생성할 때 지정해야 한다.
Parameter를 지정할 수 있는 Context Index Table과 Index는 다음과 같다.
Table Index
DR_nnnnn_I1T DR_nnnnn_i1I
DR_nnnnn_KTB DR_nnnnn_KIK
DR_nnnnn_KID
DR_nnnnn_LST DR_nnnnn_LIX
DR_nnnnn_SQR DR_nnnnn_SRI
위에서 nnnnn은 policy의 id이다. 이 번호는 다음과 같이 확인할 수 있다.
select pol_id from ctx_user_policies where pol_name = 'DEMO_POLICY';
처음 policy를 생성한 후 create index시 생성되는 Table과 Index는
default로 해당 유저의 default tablespace에 생성된다. 그러나 default
tablespace가 부족하거나 생성되는 table의 크기가 크면 initial, next등의
parameter가 작아서 maxextent를 초과하는 문제가 발생하기도 한다.
이런 경우 원하는 데이타를 올바로 찾지 못할 수도 있다. 이 때에는 storage
parameter나 tablespace등을 따로 지정해 주어야 한다.
2. Preference 생성
Index table에 대한 parameter를 지정하려면 먼저 Generic Engine
Tile의preference를 생성해야 한다. 이 generic engine tile에는
다음과 같은 attribute를 지정할 수 있다.
(1) Generic Engine Tile의 Attribute
- index_memory
- optimize_default
- i1t_tablespace i1t_storage i1t_other_parms
- i1I_tablespace i1I_storage i1I_other_parms
- ktb_tablespace ktb_storage ktb_other_parms
- kid_tablespace kid_storage kid_other_parms
- kik_tablespace kik_storage kik_other_parms
- lst_tablespace lst_storage lst_other_parms
- lix_tablespace lix_storage lix_other_parms
- sqr_tablespace sqr_storage sqr_other_parms
- sri_tablespace sri_storage sri_other_parms
xxx_tablespace는 각 table과 index의 tablespace를 지정하며 xxx_storage는
storage절을, xxx_other_parms는 그 외의 다른 parameter를 지정할 수 있다.
(2) 명령 형식
CTX_DDL.SET_ATTRIBUTE
( name in varchar2, - 원하는 attribute이름
value in varchar2 ); - 앞의 attribute에 해당하는 값
CTX_DDL.CREATE_PREFERENCE
( preference_name in varchar2, - 임의의 preference이름
description in varchar2, - comment
object_name in varchar2 ); - 이 경우 GENERIC ENGINE
Example
[ 예제 1 ] 새로운 policy를 생성하는경우 parameter지정하기.
begin
ctx_ddl.set_attribute('I1T_TABLESPACE','USERS');
ctx_ddl.set_attribute('I1T_STORAGE','INITIAL 10M NEXT 10M');
ctx_ddl.set_attribute('I1T_OTHER_PARMS','PCTFREE 10');
ctx_ddl.set_attribute('I1I_TABLESPACE','USERS');
ctx_ddl.set_attribute('I1I_STORAGE','INITIAL 10M NEXT 10M');
ctx_ddl.set_attribute('I1I_OTHER_PARMS','PCTFREE 10');
ctx_ddl.create_preference('ART_ENGIN','Test Case','GENERIC ENGINE');
ctx_ddl.create_policy('DEMO_POLICY',
'ARTICLES.TEXT',
lexer_pref=>'CTXSYS.KOREAN',
engine_pref=>'ART_ENGIN');
ctx_ddl.create_index('DEMO_POLICY');
end;
위의 예에서는 I1T table과 i1I index에 대한 parameter를 설정하였다.
preference를 생성한 후 create_policy에서 engine_pref 에 생성한
preference이름을 준다. 위의 예와 같이 실행한 후에 다음과 같이
확인해 볼 수 있다.
SQL> select table_name, tablespace_name from user_tables
2 where table_name = 'DR_01104_I1T1';
TABLE_NAME TABLESPACE_NAME
DR_01104_I1T1 USERS
( dr_01104_i1t 는 synonym이며 dr_01104_i1t1이 base table이다. )
SQL> select index_name, tablespace_name from user_indexes
2 where table_name = 'DR_01104_I1T1';
INDEX_NAME TABLESPACE_NAME
DR_01104_I1I1 USERS
[ 예제 2 ] 기존의 policy에 새로운 preference 적용하기
이 방법은 기존에 존재하는 policy를 update하여 preference 를 적용하는
방법이다. 이 경우 generic engine 은 update_policy를 하기 전에 index를
drop해야 한다.
begin
ctx_ddl.set_attribute('I1T_TABLESPACE','USERS');
ctx_ddl.set_attribute('I1T_STORAGE','INITIAL 10M NEXT 10M');
ctx_ddl.set_attribute('I1T_OTHER_PARMS','PCTFREE 10');
ctx_ddl.set_attribute('I1I_TABLESPACE','USERS');
ctx_ddl.set_attribute('I1I_STORAGE','INITIAL 10M NEXT 10M');
ctx_ddl.set_attribute('I1I_OTHER_PARMS','PCTFREE 10');
ctx_ddl.create_preference('ART_ENGIN','Test Case','GENERIC ENGINE');
ctx_ddl.drop_index('DEMO_POLICY');
ctx_ddl.update_policy('DEMO_POLICY',
engine_pref=>'ART_ENGIN');
ctx_ddl.create_index('DEMO_POLICY');
end;
Reference Document
Context User's Guide and Context Reference
Maybe you are looking for
-
I have two regions in row one and another region in row two. Top region in column one has just one column and bottom region in column one has 5 columns. The form layout looks awkward as column 1 regions are odd size. I tried to increase the top regio
-
Condition Type for commissions across sales orders
Hi, I have a requirement for which I need inputs: We have sales employee who will get commissions based on the total sales they make. The relevant sales employee will be brought into SAP as a business partner (specific account group and hence partner
-
Where to find help with Lightbeam ?
Firefox 27.0.1 Windows 7 Ultimate Lightbeam shows a black window, the only action of icons is when hovering them, they change color, no other action. Thanks
-
TS1369 I have windows 8 I can't sync my ipod classic
itunes doesn't recognize my ipod dassic using windows 8. it loads music slow
-
My m305d s4829 will not full turn on
The power light turns on and you hear the fan turn but nothing else lights up... The fan goes silent after a second and nothing appears on the screen it sits there. Acting like it's halfway on... What should I do?