Oracle Text corresponds to unexpected lines
Hi people:
I use Oracle Text in Oracle 12 c to search the text for a column that is indexed as follows:
We will examine these lines.
- Table X
Text |
---|
90-SE |
90-BA |
Hello |
I want to search the text "90-SE", then I did the following SQL query:
SELECT TEXT, SCORE (1)
X
WHERE CONTAINS (TEXT, '90\ - SE', 1) > 0;
The result is:
Score (1) | TEXT |
---|---|
5 | 90-SE |
5 | 90-BA |
I can't understand why it is corresponding to the line containing 90-BA.
Thank you
ytor
I am unable to reproduce your error, but I do not know what lexer attributes and others you may have. I don't know if you are aware that unless you set the hyphen as a printjoin it is not indexed. Please see the demo below, noting the differences in the token_text.
Scott@ORCL > select version banner $ v
2.
BANNER
--------------------------------------------------------------------------------
Database Oracle 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit Production
PL/SQL Release 12.1.0.2.0 - Production
CORE Production 12.1.0.2.0
AMT for 64-bit Windows: Version 12.1.0.2.0 - Production
NLSRTL Version 12.1.0.2.0 - Production
5 selected lines.
Scott@ORCL > create table x
2 (text varchar2 (60))
3.
Table created.
Scott@ORCL > insert all
2 in the x values (90-SE "")
3 in x values (90-BA "")
values ('Hello') x 4
5 Select * of the double
6.
3 lines were created.
Scott@ORCL > create index x_text_idx on x (text)
2 indextype is ctxsys.context
3.
The index is created.
Scott@ORCL > select Dr. token_text $ x_text_idx$ I
2.
TOKEN_TEXT
----------------------------------------------------------------
90
BA
Hello
IS
4 selected lines.
Scott@ORCL > SCORE (1) SELECT, TEXT
2 X
3. WHERE CONTAINS (TEXT, '90\ - SE', 1) > 0
4.
SCORE (1) TEXT
---------- ------------------------------------------------------------
4 90-SE
1 selected line.
Scott@ORCL > start
2 ctx_ddl.create_preference ('test_lex', 'basic_lexer');
3 ctx_ddl.set_attribute ('test_lex', 'printjoins', '-');
4 end;
5.
PL/SQL procedure successfully completed.
Scott@ORCL > drop index x_text_idx
2.
The index is deleted.
Scott@ORCL > create index x_text_idx on x (text)
2 indextype is ctxsys.context
3 parameters ("lexer test_lex")
4.
The index is created.
Scott@ORCL > select Dr. token_text $ x_text_idx$ I
2.
TOKEN_TEXT
----------------------------------------------------------------
90-BA
90-SE
Hello
3 selected lines.
Scott@ORCL > SCORE (1) SELECT, TEXT
2 X
3. WHERE CONTAINS (TEXT, '90\ - SE', 1) > 0
4.
SCORE (1) TEXT
---------- ------------------------------------------------------------
4 90-SE
1 selected line.
Tags: Database
Similar Questions
-
Oracle text index - unexpected behavior
We have a SEARCH_TABLE (in Oracle 12.1.0.1.0) with a couple of files (actually about 10,000,000 records):
ID ADDRESS
1 | WIMPEL | 57. 9733BK | GRONINGEN |
2 | JOHAN WILSSTRAAT | 7 ||| 1333PV | ALMERE |
3 | ABRAHAM KUYPERHOF | 10. 8091XN | WEZEP |
To support research on the table addresses, we apply an Oracle text index:
create index ST_CTX1 on SEARCH_TABLE (address)
indexType is ctxsys.context
parameters ("DATASTORE CTXSYS. DEFAULT_DATASTORE');
Our research focuses on whole words (without jokers). When searching through the data, it usually comes back with the correct results.
SELECT THE ID
OF SEARCH_TABLE
WHERE CONTAINS (ADDRESS, 'GRÖNING') > 0
;
Returns nothing, that is correct. Once the search argument 'GRÖNING' is replaced by 'GRONINGEN', ID 1 is correctly selected. According to this behavior, the following query returns no records:
SELECT THE ID
OF SEARCH_TABLE
WHERE CONTAINS (ADDRESS, 'ABR & KUYPERHOF') > 0
;
Surprisingly, however, the following query returns record ID 3:
SELECT THE ID
OF SEARCH_TABLE
WHERE CONTAINS (ADDRESS, ' A & KUYPERHOF ') > 0
;
(Even if data does not contain the complete word 'A'). This unexpected behavior only seems to occur when you use "A" as the initial character.
The following query (with the search starting with the character 'J' argument) returns no data. Which is the expected behavior.
SELECT the ID
OF SEARCH_TABLE
WHERE CONTAINS (ADDRESS, 'J & WILSSTRAAT') > 0
;
Anyone has an idea why the text index returns with A situations? Any ideas on how to solve this problem are appreciated.
Mark
According to the list of empty words by default in 11.2, the letters a, d, i, s, and t are listed, so would be removed from the wanted list of tokens. Thus, 'A & WILSSTRAAT' becomes '& WILSTRAAT' and search text line with a single word. 'j' is not an empty word, so it is considered to be a token is valid and is not in your tables. Look in CTXSYS. CTX_STOPWORDS to see what you have.
-
Hi gurus/masters.
Please advise on Oracle Text? I search in google. But getting junk info. Is this feature is there in oracle?
Concerning
SA
This is a change from what I previously provided, its replacement by the table and column names and values that you provided, so that if all goes well it will allow you to understand. I have also provided the text results simple separate query of the procedure that uses it. I have shown with a string of values and a unique value, you provided.
Scott@orcl12c >-table:
Scott@orcl12c > CREATE TABLE Entitlement_dnt
2 (order_number VARCHAR2 (15),)
3 customer_num VARCHAR2 (15).
4 generic_product_name_ext VARCHAR2 (25).
5 entitlement_ref_id VARCHAR2 (15).
6 device_asset_id VARCHAR2 (15))
7.
Table created.
Scott@orcl12c >-data:
Scott@orcl12c > INSERT ALL
2 INTO Entitlement_dnt VALUES ('1000345', '342345', ' laptop', '123', 'SDILK143')
3 INTO Entitlement_dnt VALUES ('1000345', '543243', 'portable', '321', '341KLIDS')
4 INTO Entitlement_dnt VALUES ('5430001', '342345', ' laptop', '123', 'SDILK143')
5 SELECT * FROM DUAL
6.
3 lines were created.
Scott@orcl12c > SELECT * FROM Entitlement_dnt
2.
ORDER_NUMBER CUSTOMER_NUM GENERIC_PRODUCT_NAME_EXT ENTITLEMENT_REF DEVICE_ASSET_ID
--------------- --------------- ------------------------- --------------- ---------------
1000345 342345 123 SDILK143 laptop
1000345 543243 portable 321 341KLIDS
5430001 342345 123 SDILK143 laptop
3 selected lines.
Scott@orcl12c >-multi_column_datastore:
Scott@orcl12c > START
CTX_DDL 2. CREATE_PREFERENCE ("your_datastore", "MULTI_COLUMN_DATASTORE");
CTX_DDL 3. SET_ATTRIBUTE
4 ("your_datastore", "COLUMNS",
5 "order_number customer_num, generic_product_name_ext, entitlement_ref_id, device_asset_id");
6 END;
7.
PL/SQL procedure successfully completed.
Scott@orcl12c >-extra column for indexing (optional):
Scott@orcl12c > ALTER TABLE Entitlement_dnt Add (search_cols VARCHAR2 (1))
2.
Modified table.
Scott@orcl12c >-text index Oracle using multi_column_datastore:
Scott@orcl12c > your_index CREATE INDEX
2 on Entitlement_dnt (search_cols)
3 INDEXTYPE IS CTXSYS. FRAMEWORK
4 SETTINGS ("your_datastore of the DATA store")
5.
The index is created.
Scott@orcl12c >-simple queries:
Scott@orcl12c > i_OpenSearchText VARIABLE VARCHAR2 (4000)
Scott@orcl12c > EXEC: i_OpenSearchText: = 1000345, 342345, laptop, 123, SDILK143'
PL/SQL procedure successfully completed.
Scott@orcl12c > SELECT *.
2 from Entitlement_dnt
3 WHERE CONTAINS (search_cols, REPLACE (: i_OpenSearchText, ', 'AND' ')) > 0
6 m
ORDER_NUMBER CUSTOMER_NUM GENERIC_PRODUCT_NAME_EXT ENTITLEMENT_REF DEVICE_ASSET_ID S
--------------- --------------- ------------------------- --------------- --------------- -
1000345 342345 123 SDILK143 laptop
1 selected line.
Scott@orcl12c > EXEC: i_OpenSearchText: = '1000345'
PL/SQL procedure successfully completed.
Scott@orcl12c > SELECT *.
2 from Entitlement_dnt
3 WHERE CONTAINS (search_cols, REPLACE (: i_OpenSearchText, ', 'AND' ')) > 0
6 m
ORDER_NUMBER CUSTOMER_NUM GENERIC_PRODUCT_NAME_EXT ENTITLEMENT_REF DEVICE_ASSET_ID S
--------------- --------------- ------------------------- --------------- --------------- -
1000345 342345 123 SDILK143 laptop
1000345 543243 portable 321 341KLIDS
2 selected lines.
Scott@orcl12c >-procedure that accepts the string of values separated by commas
Scott@orcl12c >- and returns ref cursor using the query:
Scott@orcl12c > prc_open_search CREATE OR REPLACE PROCEDURE
2 (i_OpenSearchText IN VARCHAR2,
3 o_result SYS_REFCURSOR to)
4 AS
5 BEGIN
6 - slider Ref that uses Oracle Text query using wil Oracle text index:
7 OPEN FOR o_result
8. SELECT *.
9 OF Entitlement_dnt
10 WHERE CONTAINS (search_cols, REPLACE (i_OpenSearchText, ', 'AND')) > 0;
11 END prc_open_search;
12.
Created procedure.
Scott@orcl12c > SHOW ERRORS
No errors.
Scott@orcl12c >-execution:
Scott@orcl12c > g_ref VARIABLE REFCURSOR
Scott@orcl12c > START
2 prc_open_search
3 (i_OpenSearchText-online 1000345, 342345, laptop, 123, SDILK143',)
4 o_result =>: g_ref);
5 END;
6.
PL/SQL procedure successfully completed.
Scott@orcl12c > g_ref PRINT
ORDER_NUMBER CUSTOMER_NUM GENERIC_PRODUCT_NAME_EXT ENTITLEMENT_REF DEVICE_ASSET_ID S
--------------- --------------- ------------------------- --------------- --------------- -
1000345 342345 123 SDILK143 laptop
1 selected line.
Scott@orcl12c > START
2 prc_open_search
3 (i_OpenSearchText-online '1000345',
4 o_result =>: g_ref);
5 END;
6.
PL/SQL procedure successfully completed.
Scott@orcl12c > g_ref PRINT
ORDER_NUMBER CUSTOMER_NUM GENERIC_PRODUCT_NAME_EXT ENTITLEMENT_REF DEVICE_ASSET_ID S
--------------- --------------- ------------------------- --------------- --------------- -
1000345 342345 123 SDILK143 laptop
1000345 543243 portable 321 341KLIDS
2 selected lines.
-
Performance issues and options to reduce the loading with the Oracle text implementation
Hi Experts,
My database on Oracle 11.2.0.2 on Linux. We have Oracle implemented for the fuzzy search. Our oracle text indexes are defined as sync on commit that we cannot afford to have stale data. Now our application done literally thousands of inserts/modifications/deletions of these columns where we have these Oracle text index defined. Thus, we see a significant impact on performance because the oracle text synchronization routines is called on each commit. We do nightly index optimization (optimization full every night at 3:00). The text index oracle internal operations are appearing at the top of the sql page in our AWR report and fears it causes a lot of load on the DB. Since we do optimization of the complete index once during the night, I think I should change that, and if I do, he's going to help us?
For example, here are some data of AWR report my one day:
Time elapsed (s) Executions Time by Exec (s) % Total % CPU %IO SQL ID SQL module SQL text 27,386.25 305 441 0.09 16.50 15.82 9.98 ddr8uck5s5kp3 Start ctxsys.drvdml.com_sync_i... 14,618.81 213 980 0.07 8.81 8.39 27.79 02yb6k216ntqf begin ctxsys.syncrn (: idxownid,...)
More top sql full text:ddr8uck5s5kp3 begin ctxsys.drvdml.com_sync_index (: idxname,: idxmem,: partname);
end02yb6k216ntqf begin ctxsys.syncrn (: idxownid,: idxoname,: idxid,: ixpid,: rtabnm,: flg); end;
Now if I do optimization of the complete index that more often, and not only once night 15:00 will be this average, the load on DB sync on commit will decrease? If Yes, how many times should I optimized and the optimization itself does not lead to a load? Can anyone suggest?
Thank you
OrauserN
It's to you which values you want to experiment. Since 1 G, which is the same as 1024M is the maximum I could try that assigning to an index and see what effect it has. You can use the same AWR report that you used previously and compare performance. To determine when paging depends on your operating system and what tools you have. Another option might be to use TRANSACTIONAL, that allows searching for unsynchronized lines and allow you to synchronize every five minutes, like Herald suggested, without any latency problem. You can read about it here (scroll down to transaction):
http://docs.Oracle.com/CD/E11882_01/text.112/e24436/csql.htm#CCREF23731
-
Need help with the search for special characters in oracle text
Hi all
Oracle 11g sql developer 4.0 help
I am facing this challenge where Oracle text when it comes to searching for text that contains a special character.
What I've done so far with the help of http://www.orafaq.com/forum/t/162229/
"CREATE TABLE"SOS" COMPANY ".
(SELECT "COMPANY_ID" NUMBER (10,0) NOT NULL,)
VARCHAR2 (50 BYTE) "COMPANY."
VARCHAR2 (50 BYTE) "ADDRESS1"
VARCHAR2 (10 BYTE) "ADDRESS2"
VARCHAR2 (40 BYTE) 'CITY ',.
VARCHAR2 (20 BYTE) 'STATE ', HE SAID.
NUMBER (5.0) "ZIP".
) CREATION OF IMMEDIATE SEGMENT
PCTFREE, PCTUSED, INITRANS 40 10 1 MAXTRANS 255 NOCOMPRESS SLAUGHTER
STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS USER_TABLES DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT 1)
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 jump. , @ - ' symbols
END;
/
CREATE INDEX my_index2 ON COMPANY (COMPANY_NAME)
INDEXTYPE IS CTXSYS. CONTEXT IN 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 2 rows back but must return 3
It helps if you post a copy and paste of effective enforcement of the full code, including the results. You posted an index of context with the query with catsearch, which requires a ctxcat index. You must be a context clue that you did not post and did not add your lexer to. The following table shows it returns all the lines of 3 as planned using either a with catsearch ctxcat index or a context index with contains, as long that you include the lexer in your create index. You must also be sure that the index is created, or synchronized after inserting or updating data.
Scott@ORCL >-version:
Scott@ORCL > SELECT banner version of v$.
BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
AMT for 64-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
5 selected lines.
Scott@ORCL >-table and the test data:
Scott@ORCL > CREATE TABLE 'SOCIETY '.
2 ("COMPANY_ID" NUMBER (10,0) NULL NOT ACTIVATE,)
3 'COMPANY_NAME' VARCHAR2 (50 BYTE),
VARCHAR2 (50 BYTE) 4 "ADDRESS1"
5 "ADDRESS2" VARCHAR2 (10 BYTE),
VARCHAR2 (40 BYTE) 6 'CITY',
7 VARCHAR2 (20 BYTE) 'STATE ', HE SAID.
NUMBER (5.0) 8 'ZIP '.
(9) THE CREATION OF IMMEDIATE SEGMENT
PCTFREE 10 10 PCTUSED 40 INITRANS, MAXTRANS NOCOMPRESS SLAUGHTER 1 255
11 STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
12 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS USER_TABLES DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT 1)
TABLESPACE 13 "USERS."
Table created.
Scott@ORCL > START
2 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (1, 'LSG SOLUTIONS LLC', null, null, null, null, null);
3 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (2,' LOVE "S TRAVEL', null, null, null, null, null);
4 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (3, 'DEVON ENERGY', null, null, null, null, null);
5 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (4, 'SONIC INC', null, null, null, null, null);
6 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (5, "MSCI", null, null, null, null, null);
7 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (6, 'ERNEST AND YOUNG', null, null, null, null, null);
8 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (7, "JOHN DEER", null, null, null, null, null);
9 insert in SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (8,'Properties@Oklahoma, LLC', null, null, null, null, null);
10 insert into SOCIETY (COMPANY_ID, COMPANY_NAME, Address1, Address2, CITY, STATE, ZIP) values (9, 'D.D.T L.L.C.', null, null, null, null, null);
11 END;
12.
PL/SQL procedure successfully completed.
Scott@ORCL >-lexer:
Scott@ORCL > START
CTX_DDL 2. CREATE_PREFERENCE ("your_lexer", "BASIC_LEXER");
CTX_DDL 3. SET_ATTRIBUTE ("your_lexer", "' SKIPJOINS,"., @-"'); -to jump. , @ - ' symbols
4 END;
5.
PL/SQL procedure successfully completed.
Scott@ORCL >-ctxcat index and using catsearch queries:
Scott@ORCL > CREATE INDEX my_index2 ON COMPANY (COMPANY_NAME)
2 INDEXTYPE IS CTXSYS. CTXCAT PARALLEL
3 PARAMETERS ("LEXER your_lexer");
The index is created.
Scott@ORCL > SELECT
2 company_name
3 the COMPANY
4. WHERE the CATSEARCH (company.COMPANY_NAME, 'LLC', ") > 0
5 ORDER BY company.COMPANY_ID;
COMPANY_NAME
--------------------------------------------------
LSG SOLUTIONS LLC
Properties@Oklahoma, LLC
D.D.T L.L.C.
3 selected lines.
Scott@ORCL >-context and using the query index contains:
Scott@ORCL > CREATE INDEX my_index3 ON COMPANY (COMPANY_NAME)
2 INDEXTYPE IS CTXSYS. CONTEXT IN PARALLEL
3 PARAMETERS ("LEXER your_lexer");
The index is created.
Scott@ORCL > SELECT
2 company_name
3 the COMPANY
4 WHERE CONTAINS (company.COMPANY_NAME, 'LLC') > 0
5 ORDER BY company.COMPANY_ID;
COMPANY_NAME
--------------------------------------------------
LSG SOLUTIONS LLC
Properties@Oklahoma, LLC
D.D.T L.L.C.
3 selected lines.
-
Oracle Text, create index (indextype is ctxsys.context)
Dear Sirs,
I am a new user of text Oracle (Oracle 11 g release 11.2) and I'm unable to create an index of type ctxsys.context). Any suggestions? :
Code:
drop table mytable;
drop index myindex force;
create table mytable (id number primary key, docs clob);
insert into mytable values (111555, "this text will be indexed '");
insert into mytable values (111556, "it is an example of default data store");
commit;
create index myindex on mytable (docs)
indexType is ctxsys.context
parameters ("DATASTORE CTXSYS. DEFAULT_DATASTORE');
+++++++
error messages:
create index myindex on mytable (docs)
*
ERROR on line 1:
ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
ORA-20000: Oracle text error:
ORA-06508: PL/SQL: called program unit is not found
ORA-06512: at "CTXSYS. DRUE", line 160
ORA-06512: at "CTXSYS. TEXTINDEXMETHODS', line 366Please check for invalid objects. Connect as sys or system and run:
Select object owner, object_name, object_type where status = 'INVALID ';
View the results here and we will advise the next step.
If all the objects owned by CTXSYS are not valid, you will need to recompile the schema CTXSYS. -
Oracle Text Index rebuilt manually or automatically by DEFAULT
For the following statement:
"The Oracle * text (officially called Oracle and Oracle Intermedia context) utility allows us to analyze through a column of large text and indexes on the words in the column."
Unlike the ordinary tree or bitmap index, index of context, ctxcat and ctxrule Oracle may be * set isn't content update is changed.* like most of Oracle databases will use with standard relational tables ctxcat index, you must decide on a refresh interval. Oracle provides the SYNC operator for this. The default value is SY ^ NC = MANUAL and you must manually synchronize the index with CTX_DDL. SYNC_INDEX.
SYNC (MANUAL |) EACH interval 'string ' | ON VALIDATION)]
«As a result, Oracle Text indexes are only useful for removing full table scans when tables are read-only in large part and/or end users don't mind not having 100% search reminder»
-My question: the statement above claims: "Oracle indexes context, ctxcat and ctxrule can be configured to not update the content is changed. '." " Then what is the default setting for updating the index, manual or automatic? For example:
First of all, I created an index like this: create index users_address_idx on users (address) indextype is ctxsys.ctxcat;
Then, I made a few changes on the table such that change the values of the column address for several lines.
The Oracle system will rebuild the ctxcat index automatically?
What does the ' default is SY ^ NC = MANUAL "as shown in the quote?
Thank you for helping.
Scott
scottjhn wrote:
This source: http://www.dba-oracle.com/oracle_tips_like_sql_index.htm States:All first upward, please do not use the Web sites which present only part of the information and instead to advertise their services.
-My question: the statement above claims: "Oracle indexes context, ctxcat and ctxrule can be configured to not update the content is changed. '." " Then what is the default setting for updating the index, manual or automatic? For example:
First of all, I created an index like this: create index users_address_idx on users (address) indextype is ctxsys.ctxcat;
Then, I made a few changes on the table such that change the values of the column address for several lines.
The Oracle system will rebuild the ctxcat index automatically?
No, the deafult is SYNC = MANUAL
http://docs.Oracle.com/CD/B28359_01/text.111/b28304/csql.htm#CIHGAAFI
>What does the ' default is SY ^ NC = MANUAL "as shown in the quote?
This means that the need for the Index to synchronize manually
http://docs.Oracle.com/CD/B28359_01/text.111/b28304/cddlpkg.htm#i998469 -
Format text in bold in the field and to put text on a new line - help!
I'm lost. I found the rich text formatting item click. But after that, I don't know what to do next. I want "BOLD" of some characters and I want some answers on separate lines, as I asked earlier. As for spans and controls - I have no programming experience. I just used that George gave to me. It worked fine, but I just need that bold text in one part of the text to print field and I need some items to be on separate lines. But I don't know where to put the information you say on the spans and I do not know the use of bold text or script start text on a new line. I'm into the calculation of the area of text box? Sorry to be so lame, but I'm no good in programming skills. Help!
For example, here's the script. In aISOreq {[0], if I want to "BOLD" "Check #1 patter: ', where should I put the span and what script should I use to say to"BOLD"it.} Could you give me an example, please. Also, if I want to put 'a. drugs weekend on one line?' and ' b. activities the weekend? Types of activities? Supervision? With whom? "on the next line, where do I put the span and what script should I use to put on separate lines? Could you give me an example for this too, please. I have used literally just scripts George gave me and they work great - but it's all I know how to do. Thank you.
(function () {}
Set up a table to hold the various paragraphs of the text
var aISOfreq = [];
Fill the table with text of paragraph
aISOfreq [0] = ' model #1: reducing several isolations on Mon & Tue to Fri. " Model # 1 verification: a. drug weekend? b. activities weekend? Types of activities? Supervision? With whom? « ;
aISOfreq [1] = ' model #2: isolation of multiple some days. " Note the days. The #2 model checking: a. Different plan these days there? Another adult? Block-schedule? Need to w/same adult consistent schedule. b. adaptations/changes occur? More group c. individual training? Does the student need warm-up exercises or a specific job? Student needs a specific lesson routine? c. activities of the previous night? Need of calming activities before bedtime? Need to bed earlier? Need additional evening structure? « ;
aISOfreq [2] = ' model #3: Isolations are grouped intermittently. " Interval of note. The #3 model checking: a. cyclical behaviour? Review the assessment. Need reference mental health intervention of medication or treatment? b. drugs: supervision? Self medication? Taking constantly? Need medication collate doctor? Share concerns with the doctor? c. history of the abuse of legal or illegal drugs? Cyclic model to share with the doctor. On probation? Share concerns with PO? « ;
aISOfreq [3] = "models #1 & #2: multiple Isolations on Mondays & Tuesdays to Friday AND several Isolations some days." Note the days. Model #1 verification: a. drug weekend? b. activities weekend? Types of activities? Supervision? With whom? The #2 model checking: a. Different schedule some days? Another adult? Block-schedule? Have a consistent schedule with same adult. b. adaptations/changes that occur? More group c. individual training? Need of specific work or warm-up exercises? Need a specific lesson routine? c. activities of the previous night? Need of calming activities before bedtime? Need to bed earlier? Additional needs night structure? ";
aISOfreq [4] = "models #1 & #3: multiple Isolations on Mondays & Tuesdays decreasing Friday AND insulation together intermittently." Note intervals. Model #1 verification: a. drug weekend? b. activities weekend? Types of activities? Supervision? With whom? The #3 model checking: a. cyclical behaviour? Review the assessment. Need reference mental health intervention of medication or treatment? b. supervision of drugs? Self medication? Taking constantly? Must check with the doctor med? Share concerns with the doctor? c. history of the abuse of legal or illegal drugs? Cyclic model to share with the doctor. On probation? Part of the concerns of w/PO? »
aISOfreq [5] = ' patterns #2 and #3: several isolates on a day specific AND insulation together intermittently. " Note day & intervals. The #2 model checking: a. different planning? Another adult? Block-schedule? Need to w/same adult consistent schedule. b. adaptations/changes that occur? More group c. individual training? Need exercises to warm-up or a specific job? Need a specific lesson routine? c. activities of the previous night? Need of calming activities before bedtime? Need to bed earlier? Additional needs night structure? The #3 model checking: a. cyclical behaviour? Review the assessment. Need reference mental health intervention of medication or treatment? b. supervision of drugs? Self medication? Taking constantly? Need medication collate doctor? Share concerns with the doctor? c. history of the abuse of legal or illegal drugs? Cyclic model to share with the doctor. On probation? Share concern w/PO? « ;
aISOfreq [6] = ' bosses, #1, #2 and #3: several isolations on Mondays & Tuesdays decreasing through Friday, several isolates some days AND insulation together intermittently. " Note the days and intervals. Model #1 verification: a. drug weekend? b. activities weekend? Types of activities? Supervision? With whom? The #2 model checking: a. different planning? Adult? Block-schedule? Need to w/same adult consistent schedule. b. adaptations/changes that occur? More group c. individual training? Need exercises to warm-up or a specific job? Need a specific lesson routine? c. activities of the previous night? Need of calming activities before bedtime? Need to bed earlier? Additional needs night structure? The #3 model checking: a. cyclical behaviour? Review the assessment. Need reference mental health intervention of medication or treatment? b. supervision of drugs? Self medication? Taking constantly? Need medication collate doctor? Share concerns with the doctor? h. history of the abuse of legal or illegal drugs? Cyclic model to share with the doctor. On probation? Share concern w/PO? « ;
aISOfreq [7] = "without cause."
Get the selected item, which is the value of exports of the selected drop-down list box item
var point = getField("ISO_Frequency_Pattern").value;
Display the text corresponding to the selected item in the text field
Event.Value is aISOfreq [point];.
})();
Look at the richValue of the Field object property reference. It contains a few examples of how it should be done. Read also the Span object reference.
-
Hi all
I use the Oracle text to perform a full text search. I have my column indexed like that
CREATE INDEX cm_property_text ON cm_property (text_value) INDEXTYPES IS CTXSYS. FRAMEWORK
After that, I inserted a line in the text_value field have contain is: "I and you or other ', then run the synchronous command my index finger:
Begin
CTXSYS. CTX_DLL. SYNC_INDEX ('cm_property_text');
end;
Then I run the query to select out have the text_value line contains text value is "I and you".
SELECT * FROM cm_property WHERE CONTAINS (text_value,' I / you "")
But I got nothing. And I tried to change like this looking for text entry
SELECT * FROM cm_property WHERE CONTAINS (text_value, ' I/you and/or other "" ");
And I had a line that is the line that I inserted before.
I have really no why? Who can help me to explain about this?
Thank you very much!If you want to be able to search for empty words by default, you can use an empty stopwords list or which does not contain the words you want to search. For a single character escape, preface with-not. To escape a whole word or phrase, such as a keyword or reserved word, surround it with {}. Please see the demo below.
SCOTT@orcl_11gR2> CREATE TABLE cm_property 2 (text_value VARCHAR2 (60)) 3 / Table created. SCOTT@orcl_11gR2> CREATE INDEX cm_property_text 2 ON cm_property (text_value) 3 INDEXTYPE IS CTXSYS.CONTEXT 4 PARAMETERS ('STOPLIST CTXSYS.EMPTY_STOPLIST') 5 / Index created. SCOTT@orcl_11gR2> INSERT INTO cm_property (text_value) 2 VALUES ('I and you or other') 3 / 1 row created. SCOTT@orcl_11gR2> Begin 2 CTXSYS.CTX_DDL.SYNC_INDEX ('cm_property_text'); 3 end; 4 / PL/SQL procedure successfully completed. SCOTT@orcl_11gR2> SELECT token_text FROM dr$cm_property_text$i 2 / TOKEN_TEXT ---------------------------------------------------------------- AND I OR OTHER YOU 5 rows selected. SCOTT@orcl_11gR2> SELECT * FROM cm_property 2 WHERE CONTAINS (text_value, 'I {and} you') > 0 3 / TEXT_VALUE ------------------------------------------------------------ I and you or other 1 row selected. SCOTT@orcl_11gR2> SELECT * FROM cm_property 2 WHERE CONTAINS (text_value, 'I {and} you {or} other') > 0 3 / TEXT_VALUE ------------------------------------------------------------ I and you or other 1 row selected. SCOTT@orcl_11gR2>
-
Hi all
We have recently migrated one of our database to oracle 10.2.0.2 to Oracle 10.2.0.4 and since that time, Oracle Text Engine an indexer is unable to work properly.
Indexing data systematically result in the following error:
DRG-50857: error oracle in dreii0fsh
ORA-06550: line 1, column 106:
PLS-00302: component 'S_MODE' must be declared.
ORA-06550: line 1, column 10:
PL/SQL: Statement ignored
Note that the data that have been indexed with the previous Oracle version can still be found with ' Select... where... contains. ', although new datas not indexable at all.
Can someone help me with this problem?
Published by: methos on May 11, 2010 06:59See on metalink:
"DRG-50857: oracle in dreii0fsh error ' when creating indexes of TEXT [750898.1 ID]"
It seems that you updated the binaries, but Oracle not the text itself.
Werner
-
Error while creating or rebuilding Oracle text Lexer keyword index
Hi all
I am getting following error when I create oracle text indexes using lexer & keyword in the list of stopwords.
Please help me if any body know.
Thanks in advance.
Error from the 1 in the command line:
CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
Post INDEXTYPE IS "CTXSYS. "" (LOCAL) CONTEXT.
PARTITION SETTINGS "BEFORE_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "THE_REST' ('LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)')
)
Error in the command line: 1 column: 13
Error report:
SQL error: ORA-29855: error when executing routine ODCIINDEXCREATE
ORA-20000: Oracle text error:
DRG-11000: invalid keyword LEXER
ORA-06512: at "CTXSYS. DRUE", line 160
ORA-06512: at "CTXSYS. TEXTINDEXMETHODS', line 365
29855 00000 - "an error occurred in the execution of routine ODCIINDEXCREATE.
* Cause: Cannot run the ODCIIndexCreate routine.
* Action: Check if the routine was coded correctly.
Kind regards
Jack R.Hello
It works if you put a clause of additional PARAMETERS to the end, so the creation looks like:
CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
INDEXTYPE IS "CTXSYS. "" (LOCAL) CONTEXT.
PARTITION SETTINGS "BEFORE_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2007" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2008" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q1_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q2_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q3_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "Q4_2009" ("LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)"),
PARTITION SETTINGS "THE_REST' ('LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)')
)
PARAMETERS ('LEXER dd_lexer list of words EMPTY dd_stoplist SYNC (ON COMMIT)')<==>==>Hope this helps
Herald tiomela
-
ORACLE TEXT INDEX ON COLUMN VARCHAR2
Hi all
I find a search in our application very slow so I thought using ORACLE TEXT CTXCAT index based search but I find some inconsistencies. How can this be avoided... The following query should not return if I can replace with the text of the oracle, but I find few values... why result... I also gave some results of the sample below...
SELECT first_name
Of uc_partner_ms
WHERE
Upper (first_name) LIKE '% WIE % '.
less
SELECT first_name
Of uc_partner_ms
WHERE CATSEARCH (name,'* wie *', null) > 0
RESULTS...
Hans-Werner Mrowiec
Heinz Oesterwiemann GmbH
Helmut Froitzheim GmbH, Neuwied
Heribert Schwies
Hermann Twieling GmbH & Co. KG
Breitwieser Horst
Horst-Dieter Swie
The script used to create indexes is
Start
ctx_ddl.create_preference ('mylex', 'BASIC_LEXER');
ctx_ddl.set_attribute ('mylex', 'index_themes', 'NO');
ctx_ddl.set_attribute ('mylex', 'mixed_case', 'NO');
end;
CREATE INDEX partner_index ON uc_partner_ms (first name)
INDEXTYPE IS CTXSYS. CTXCAT
parameters ('mylex LEXER');
Where am I wrong that I couldn't guess a trend in the other that all results be lowercase...(1) what is the difference
tag brings in the query? This is the QUERY MODEL, which allows you to use the CONTEXT GRAMMAR on the CTXCAT index, as if you were using CONTAINS. There are examples in the documentation here:
http://download.Oracle.com/docs/CD/B19306_01/text.102/b14218/csql.htm#i1000002
(2) is it a good idea to replace catsearch for like operator leader %?
The wildcard character for a CATSEARCH operator on a CTXCAT index is the asterisk. The wildcard character for an operator CONTAINS a CONTEXT index is a percent sign. CATSEARCH does not support major wildcards, you can use a word followed by an asterisk, but not preceded by an asterisk. The percent sign is not a valid wildcard with CATSEARCH. However, when you use the query template and specify GRAMMAR = "CONTEXT". Then, it's as if you were using a CONTAINS operator with a CONTEXT index, so you can use a wildcard of beginning and the % sign is the wildcard character. You can use AS with signs of percentage before and after, but it is likely to be very slow, because it cannot use an index. If the main characters using generic is going to be a frequent requirement, then you would probably be better with a hint of CONTEXT with a BASIC_WORDLIST valued SUBSTRING_INDEX true for optimal speed.
(3) also, I read in 10 g, the maximum number of rows returned is only 15000. is this true?
N ° you probably read about the WILDCARD_MAXTERMS of 15,000 in 10 g limit. This is the maximum number of separate tokens (not lines) that can match a wildcard character without producing an error. In 11g the maximum is 50,000. The default values are lower. If you want to allow a large number of generic searches that match a large number of chips, then you probably assign the WILDCARD_MAXTERMS the most. However, there will always be some queries that are too general, you should plan to trap the error and returns a comprehensible message to your user, asking them that their search is too broad and to enter a value for more specific search.
-
I'm using Oracle 9i (9.2.0.5.0) and I cannot upgrade to a newer version of Oracle DB.
I am new to this technology, and I have not tried it yet myself.
I was reading some articles, documents or references on Oracle text technology and I find that Oracle text must be able to create an index of context on files residing on the FTP server.
I also discovered that, for this purpose, a 'URL_DATASTORE' should be used.
I'd be happy if someone can answer my question before I decide to start using this technology:
Is there a limitation that I should be informed when creating index of context on files residing on the FTP server? (file size limit, limitation of the types of files supported)
-In the creation of the index process are the files indexed, downloaded and copied in the Oracle database permanently or only temporarily until the index is created?
-Everything is of incremental indexing (when I add new files in the data store that I don't have to rebuild the entire index)?
There there a formula between context index disk size and the disk size indexed files?
Kind regards
MichalIs there a limitation that I should be informed when creating index of context on files residing on the FTP server? (file size limit, limitation of the types of files supported)
Maximum file size is configurable up to 2 GB. No limitation on the file type from the data store itself, but if you want to process binary file list filter suported file formats will apply (see the appendix in the Administrator's guide)-In the creation of the index process are the files indexed, downloaded and copied in the Oracle database permanently or only temporarily until the index is created?
That temporarily-Everything is of incremental indexing (when I add new files in the data store that I don't have to rebuild the entire index)?
The question, I suspect that you see this as a robot - you expect to provide the address of an FTP site and have it look for all documents. This isn't how it works. Instead, you must place all of the URLS in a table, and text will index these URLS (and only these URLs)If new files are added, you must reorganize somehow having the new lines added to your table. Then the text will do an incremental update, it will not have to rebuild the entire index.
There there a formula between context index disk size and the disk size indexed files?
It varies a lot depending on the data types and indexing of selected options, but a typical result is that the index will be 40% of the total size of the file. However, if the documents are in the format (for example, Word, PDF) the percentage will be much smaller. -
The access key to set the text in the address line cursor (and other quick access keys)
The access key which defines the text cursor to the line of the Web address (in some versions (3.0, 4.0) of MS Internet Explorer IE < Ctrl + F4 >)? Or how to assign a?
And where is the list of all the hotkeys using FireFox?(Mozilla/5.0 (X 11; U; Linux i686; en-US; RV:1.9.2.11) Gecko/20101026 Hat/3.6-2.el5 red Firefox/3.6.11)
Hello
Please try Alt + D. Firefox keyboard shortcuts.
-
Text jumps on another line when you type
Text problems
When I type, all I can do about that now and then the text jumps on another line making the unintelligible sentence. Is there.
See... He did then. This is an example!"Hide pointer while typing" was already checked. I slowed down a little pointer, and so far, while I was typing this message I had no problem.
Thanks a lot for your helpConcerningJohn
Maybe you are looking for
-
4655 HP Office Jet: How can I fax multiple pages using the hp officejet 4500 desktop computer
How can I fax multiple pages using the hp officejet 4500 desktop that you just bought
-
How to move a Time Capsule backup to a new hard drive
I've been running Time Capsule on an external FireWire drive Yosemite 10.10.5 running on a MacPro to 2012. It will allow more to perform backups and disk utility fails to remove the disc. When I run the disk repair, either via the recovery disc or a
-
Tout-en-ai-un HP Deskjet F4500 printer
I was given a tout-en-ai-un HP Deskjet F4500 printer, I installed it on my HP computer, but it says that there is no connected drivers. I went to the HP site and download the necessary drivers for that printer, and he says still no driver. Don't know
-
The scrolling feature is flicking/back to top of page when I move the scroll bar
When I use the scroll function in the menu of the Explorer, it flashes back and forward/back back to top - when I move the scroll bar! It may be a virus or something, but my antivirus software cannot be removed (antivirus software: 360 Total Security
-
Is there a way to also disable shortcut on a microsoft Natural Ps/2 keyboard keys
I would like to disable the hot keys at the top of my Board to use a console for kids fisher price game, because whenever they press the keys, he presses the sleep button and the computer responds to please someone?