Oracle Text contain query limit with 9i
The Oracle Text contain query is defined as this:
CONTAINS(
[schema.]column,
text_query VARCHAR2
[,label NUMBER])
RETURN NUMBER;
Is the size limit of text_query 4000 bytes with 9i? Is it increased with 10g or is it accepting CLOB in 10g?
I always got the error: "ORA-01460: unimplemented or unreasonable conversion requested" when I do the following where p_var was dynamically passed with size of more than 4000 bytes:
p_statement varchar2(20000);
p_var varchar2(8000);
p_statement := select count(*) from dewey_table where contains(concat, :x)>0;
open m_cursor for p_statement using p_var;
Thanks very much,
Kevin
The limit is definitely 4000 characters in 9i and the 10g documentation shows no change in the calling spec for that parameter.
Similar Messages
-
Search for Special Character in Oracle Text CONTAINS Query
Hi,
We have to write few query which will search for email id in the Oracle Text.
The Search text will be like <[email protected]> .
So email id should be searched correctly with the @ symbol.
Similarly we want the following special character to be searched in the Text like ",',*You will need to escape the special characters by either using \ in front of each special character or putting {} around the whole phrase that contains the special characters, as per the online documentation:
http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqspcl.htm#CCREF2091 -
Oracle text contains and mixed queries
Trying to optimize the following sql statement using oracle text. When postal code is given, I would like to limit the contains to only filter the smaller subset. Both of these queries produce the same results in the same amount of time with practically identical explain plans. Is there any way to get contains to only search the subset of postal codes and not the entire table.
select *
from ADDRESS
where CONTAINS(ADDRESS1_TEXT, ' "1%" AND "%str%" ') > 0
and POSTAL_CODE like '77539%'
select *
from ADDRESS
where address_id in (select address_id from address where POSTAL_CODE like '77539%')
and CONTAINS(ADDRESS1_TEXT, ' "1%" AND "%str%" ') > 0
Thanks for any help,
GusYou can use FILTER BY in the index creation and SDATA in the query, as shown below.
SCOTT@orcl12c> CREATE TABLE address
2 (address1_text VARCHAR2(15),
3 postal_code VARCHAR2(15))
4 /
Table created.
SCOTT@orcl12c> INSERT INTO address VALUES ('12 astrb', '775391')
2 /
1 row created.
SCOTT@orcl12c> INSERT INTO address
2 SELECT SUBSTR (object_name, 1, 15),
3 object_id
4 FROM all_objects
5 /
89979 rows created.
SCOTT@orcl12c> CREATE INDEX test_idx
2 ON address (address1_text)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 FILTER BY postal_code
5 /
Index created.
SCOTT@orcl12c> SET AUTOTRACE ON EXPLAIN
SCOTT@orcl12c> SELECT * FROM address
2 WHERE CONTAINS
3 (address1_text,
4 '"1%" AND "%str%" AND SDATA (postal_code LIKE ''77539%'')') > 0
5 /
ADDRESS1_TEXT POSTAL_CODE
12 astrb 775391
1 row selected.
Execution Plan
Plan hash value: 3864510387
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 44 | 1320 | 13 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| ADDRESS | 44 | 1320 | 13 (0)| 00:00:01 |
|* 2 | DOMAIN INDEX | TEST_IDX | | | 4 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("CTXSYS"."CONTAINS"("ADDRESS1_TEXT",'"1%" AND "%str%" AND SDATA
(postal_code LIKE ''77539%'')')>0)
Note
- dynamic statistics used: dynamic sampling (level=2)
SCOTT@orcl12c> -
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.
-
Index rules in oracle text and query using matches
Dear All,
I would like to ask about rules and matches function in oracle text.
I followed an example in oracle text application developer's guide.
I have a rule table like this :
1 oracle
2 larry or ellison
3 oracle and text
4 market share
then, I create an index to that table. This is needed for calling matches function. Here is the syntax :
create index queryx on queries(query_string)
indextype is ctxsys.ctxrule;
then, I noticed that the result on DR$QUERYX$I table as follows :
LARRY 0 2 2 1 (BLOB)
MARKET 0 4 4 1 (BLOB) {MARKET} {SHARE}
ORACLE 0 1 1 1 (BLOB)
ORACLE 0 3 3 1 (BLOB) {TEXT}
ELLISON 0 2 2 1 (BLOB)
What I want to ask is why doesn't the words 'share' and 'text' appear in the DR$QUERYX$ table?
When we use matches function, it then search on the index result and consequently it wion't find the 'share' word. so when for example I do query like this :
select query_id from queries where matches(query_string,' It only share ten percent of all products sold')>0
it will give 0 result since the no word in ' It only share ten percent of all products sold' was in index table. But actually it could possibly be categorized as the 4 category which rules is 'market share'
I tried this in a larger set of data and get same result.
Here is my generated rules from my document collection :
1 {REQUIREMENTS} & {ELICITATION}
1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} & {PLACED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} & {UNNECESSARY}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} ~ {DOCUME} ~ {PLACED} ~ {UNNECESSARY} & {MISUSE}
1 {INTERPRETATION} ~ {REQUIREMENTS}
2 {DESIGN} & {REPRESENTATION}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} & {GRASP}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} ~ {STRICT} ~ {GRASP} & {MANY} & {LAYER}
2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
3 {PM} & {TESTING} & {ATTRIBUTI}
And this is the index table result with ctxrule :
(only the token_text column shown)
PM
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
INTERPRETATION
so when I try to classify a document with the word ouline inside it, it should produce category 1 (based on the rules) but since there are no word 'outline' in index tabel, the matches will return 0 means that the document is not classifiedto any category. I don't understand why it happen. Anybody knows about this? I would really appreciate any help.
Thank you very much.Hm, I see. It do make sense. so nice to know.
But then in the second example I gift where I used larger table, as shown below :
Here is my generated rules from my document collection :
1 {REQUIREMENTS} & {ELICITATION}
1 {REQUIREMENTS} ~ {ELICITATION} & {ACTOR}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} & {FURPS}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} & {PROC}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} & {SPEED}
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE} ~ {PROC} ~ {SPEED} & {DOCUME}
1 {INTERPRETATION} ~ {REQUIREMENTS}
2 {DESIGN} & {REPRESENTATION}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} & {OCTOBER}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} & {PROCEDURAL}
2 {DESIGN} ~ {REPRESENTATION} & {MAY} & {FOUNDATI} ~ {OCTOBER} ~ {PROCEDURAL} & {STRICT}
2 {DESIGN} ~ {REPRESENTATION} ~ {MAY}
3 {PM} & {TESTING} & {ATTRIBUTI}
As far as I know, the sign ' ~ ' means 'OR' and '&' means 'and' . So based on the 4th line in my table :
1 {REQUIREMENTS} ~ {ELICITATION} ~ {ACTOR} ~ {FURPS} ~ {OUTLINE}
it can be concluded that if any of the words stated there been queried, so the category '1' will appear as a result. But then before we can use 'matches' to query it, we need ti create index for the rules table . I did it and the result were :
(only the token_text column shown)
PM
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
DESIGN
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
REQUIREMENTS
INTERPRETATION
there were no words other than PM, DESIGN< REQUIREMENTS and INTERPRETATION. Why the words REQUIREMENTS, ELICITATION, ACTOR, FURPS, OUTLINE don't appear in the index result? -
Dear Professionals,
I am using oracle text functionality(11g).
Is there any way to replace '-' with space and search the as full text as '18005-12220',or partial(either 18005 or 12220 ) as keyword.
case 1)
select * from search_table where CONTAINS(searchdata,'18005\-12220')>0;
o/p=>18005-12220 xyz abc address 145
case 2)
select * from search_table where CONTAINS(searchdata,'18005')>0;
o/p=>no rows
case 3)
select * from search_table where CONTAINS(searchdata,'12220')>0;
o/p=>no rows
BEGIN
ctx_ddl.create_preference ('SUBSTRING_PREF', 'BASIC_WORDLIST');
ctx_ddl.set_attribute ('SUBSTRING_PREF', 'substring_index', 'YES');
ctx_ddl.set_attribute ('SUBSTRING_PREF', 'prefix_index', 'YES');
ctx_ddl.set_attribute ('SUBSTRING_PREF', 'prefix_min_length', 1);
ctx_ddl.set_attribute ('SUBSTRING_PREF', 'prefix_max_length', 10);
ctx_ddl.set_attribute ('SUBSTRING_PREF', 'WILDCARD_MAXTERMS', 10000);
ctx_ddl.create_preference('mylex', 'BASIC_LEXER');
ctx_ddl.set_attribute('mylex', 'printjoins', '_-');
Ctx_Ddl.Set_Attribute ( 'mylex', 'index_themes', 'FALSE');
Ctx_Ddl.Create_Preference('my_text_storage', 'BASIC_STORAGE');
ctx_ddl.set_attribute('my_text_storage','I_TABLE_CLAUSE', 'tablespace users storage (initial 10M next 10M)');
ctx_ddl.set_attribute('my_text_storage', 'K_TABLE_CLAUSE', 'tablespace users storage (initial 10M next 10M)');
ctx_ddl.set_attribute('my_text_storage', 'R_TABLE_CLAUSE', 'tablespace users storage (initial 10M) lob (data) store as (cache)');
ctx_ddl.set_attribute('my_text_storage', 'N_TABLE_CLAUSE', 'tablespace users storage (initial 1M)');
ctx_ddl.set_attribute('my_text_storage', 'I_INDEX_CLAUSE', 'tablespace users storage (initial 1M) compress 2');
ctx_ddl.set_attribute('my_text_storage', 'P_TABLE_CLAUSE', 'tablespace users storage (initial 1M)');
END;thanks Roger Ford for your valuable suggestion.problem is resolved now.
-
Using xsql params w/in oracle text "contains" clause
Hello,
Regarding the xsql code below:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="hrefs.xsl"?>
<page connection="rxschema" xmlns:xsql="urn:oracle-xsql">
<xsql:query file="%winping-utility%" version="1.0"
null-indicator="yes" link="">
select distinct c.contentpathname
from rx_schema.ct_shared s, rx_schema.contentstatus c
where s.contentid = c.contentid
and contains (s.ul_file, '{@link} within href') > 0
and s.revisionid = (select max(revisionid)
from rx_schema.ct_shared
where contentid = s.contentid)
order by contentpathname
</xsql:query>
</page>
specifically this line:
and contains (s.ul_file, '{@link} within href') > 0
This query doesn't work, I think the "{@link}" xsql param (passed in) is being interpreted as an xml attribute (since it's within the "contains" clause), is there a way to force it to read this as a param? I also tried it w/o the braces (and I also verified that it works when I hardcode a value in place of "@link").
Thanks,
JSKThe syntax of a 'Contains' query should contain only the 'Contains' query operators.
http://www.cise.ufl.edu/help/database/oracle-docs/text.920/a96518/cqoper.htm#1360 -
Create Oracle Text stoplist in Java with PL/SQL
Hi, I need help with this
I do connection Oracle database with Java by using JDBC. I need create stoplist in my
Oracle Text application that I create with PL/SQL procedure. I want to add stopwords to
this stoplist directly in Java therefore I must create this procedure in Java.
This procedure is:
begin
ctx_ddl.create_stoplist('mystop', 'BASIC_STOPLIST');
ctx_ddl.add_stopclass('mystop', 'NUMBER');
ctx_ddl.add_stopword('mystop', 'word1');
end;
CTX_DDL is package in Oracle Text. This procedure runs functions directly on Oracle no
problems. I don´t know - how create this procedure in Java and run this in Oracle by
using JDBC. Can you anybody help, please?> The problem is that we have a compatibility problem with LDAP. When I try to retrieve information
in LDAP, I have strange characters that appears instead of accents like é,è,ë or whatever... someone
in my developement team has the same problem and he solved it using java.naming.ldap.version and put
it in version 2. The problem is that he developed in Java and I am in PL/SQL. That's the problem...
No. That is not the problem.
The problem is that you have no clue what the problem is, and now jump at the first available thing that seems to be a solution for this unknown problem. And who knows just how many other problems this so-called solution will now introduce... never mind whether or not the root cause of the original problem will be solved by this solution.
Software engineering does not work like this.
Software engineering says: Identify the Problem.
Analyse the Problem.
Solve the ProblemAll you have identified is a symptom of some problem. A character set issue. How about identifying the actual problem and then solving that problem comprehensively? -
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 -
Best way to implement oracle TEXT on multiple tables with regular updates
Hi,
I have the following situation:
5 tables where we want full text search on multiple columns.
Some of the tables have a master/detail relation. (1 to 1000, or more)
because of the number of transactions on these tables we can't have a lag in the sync time.
Currently I have create a dummy table just for the search with 2 columns: for the primary key to all the other tables and one for the update trigger.
I use the user_datastore with a procedure to join all the necessary columns resulting in a clob.
My question is regarding the update.
Of course I can create triggers to update the dummy field in the search table, but this will give lot of updates on that table with possible locking issues.
What would be the best approach to have this search functionality working?
I am open for any ideas!
Thanks,
EdwardOk, I will focus on building a solution on 12c.
right now I have used a USER_DATASTORE with a procedure to glue all the field together in one document.
This works fine for the search.
I have created a dummy table on which the index is created and also has an extra field which contains the key related to all the tables.
So, I have the following tables:
dummy_search
contracts
contract_ref
person_data
nac_data
and some other tables...
the current design is:
the index is on dummy_search.
When we update contracts table a trigger will update dummy_search.
same configuration for the other tables.
Now we see locking issues when having a lot of updates on these tables as the same time.
What is you advice for this situation?
Thanks,
Edward -
How to limit the number of search results returned by oracle text
Hello All,
I am running an oracle text search which returned the following error to my java program.
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
#### ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
java.sql.SQLException: ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
ORA-20000: Oracle Text error:
DRG-51030: wildcard query expansion resulted in too many terms
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
When i looked up the net, one suggestion that was given is to narrow the wildcard query, which i cannot in my search page. Hence I am left with the only alternative of limiting the number of results returned by oracle text search query.
Please let me know how to limit the number of search results returned by oracle text so that this error can be avoided.
Thanks in advance
krkHi,
If not set explicitly, the default value for WILDCARD_MAXTERMS is 5000. This is set as a wordlist preference. This means that if your wildcard query matches more than 5000 terms the message is returned. Exceeding that would give the user a lot to sift through.
My suggestion: trap the error and return a meaningful message to the user indicating that the search needs to be refined. Although it is possible to increase the number of terms before hitting maxterms (increase wildcard_maxterms preference value for your wordlist), 5000 records is generally too much for a user to deal with anyway. The search is not a good one since it is not restricting rows adequately. If it happens frequently, get the query log and see the terms that are being searched that generate this message. It may be necessary to add one or more words to a stoplist if they are too generic.
Example: The word mortgage might be a great search term for a local business directory. It might be a terrible search term for a national directory of mortgage lenders though (since 99% of them have the term in their name). In the case of the national directory, that term would be a candidate for inclusion in the stoplist.
Also remember that full terms do not need a wildcard. Search for "car %" is not necessary and will give you the error you mentioned. A search for "car" will yield the results you need even if it is only part of a bigger sentence because everything is based on the token. You may already know all of this, but without an example query I figured I'd mention it to be sure.
As for limiting the results - the best way to do that is to allow the user to limit the results through their query. This will ensure accurate and more meaningful results for them.
-Ron -
Hi,
I'm tasked to help design an application that will have Oracle Text powering the searching logic. The application will have millions of records (in the 30 million to 50 million range), but there's a restriction that 95% of all searches must be able to complete in 1 second or less (!)
So, my question is, is it possible for Oracle Text to meet this criteria? Assuming we have the best hardware, etc. Or should I look for another solution/approach?
Regards,
RoyHi Roy,
It's pretty hard to give a yes/no answer based on the limited information. I will say that Oracle's method of indexing is fairly standard (dictionary/postings list) so you are not likely to find a better solution if your records are stored in Oracle. The Oracle Text advantage - tight integration with the database already. You have storage and query optimization features of Oracle when using Oracle Text. < 1 sec response time is pretty tight for any search, but I don't think you'd have any better chance at hitting it with another solution.
Thanks,
Ron -
Hi Expert,
how can i use the Oracle text to do searching with the XML documents?
as i shredded the xml documents into the SQL view already,
i cannot create index onto those views.
what can i do with the Oracle text search?
THX a lot~!
EdithHi Edith:
Oracle Text can index document in UTF8 or any other encoding supported by Oracle.
Assuming that your table is LRPAPER_XMLTYPE_TBL you can create a Text index with:
create index LRPAPER_XMLTYPE_TBL_idx on LRPAPER_XMLTYPE_TBL p (value(p)) indextype is ctxsys.context;If you have documents with different languages stored in the same table you has to find some scalar column to be used as discriminator value. In my example "lang" is an scalar column of type varchar2. See the annotated schema at:
http://www.dbprism.com.ar/xsd/document-v20-ann.xsd
This annotated schema creates these Oracle types:
SQL> desc "document"
Name Null? Type
SYS_XDBPD$ XDB.XDB$RAW_LIST_T
id VARCHAR2(4000 CHAR)
lang VARCHAR2(4000 CHAR)
header headerType
body CLOB
footer footerType
SQL> desc "headerType"
"headerType" is NOT FINAL
Name Null? Type
id VARCHAR2(4000 CHAR)
lang VARCHAR2(4000 CHAR)
title VARCHAR2(4000 CHAR)
subtitle VARCHAR2(4000 CHAR)
version versionType
type VARCHAR2(4000 CHAR)
authors authorsType
notice VARCHAR2(4000 CHAR)
abstract VARCHAR2(4000 CHAR)
meta metaListSo the syntax "XMLDATA"."lang" is referencing to the attribute (column) "lang" of the type document.
Best regards, Marcelo. -
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 - issue with contains query
Hello,
Need urgent help.
Following code in my procedure is giving me error.
TYPE c_1 is ref cursor;
result_cursor c1;
i_text2 := 'NEW%';
open result_cursor for
'select /*+ INDEX_SS_DESC(e cad_addr_idx2 )*/
from cad_address
where
contains(text, {:i_text2}, 1) > 0
and rec_type in (1,2,3,4)
order by occur_count desc'
using
i_text2;
ORA-00936: missing expression
ORA-06512: at "AV_OWNER.MY_PROC", line 43
ORA-06512: at line 6
Oracle version is 11.2.0.3.0.
Thanks,check your table is 'text indexed' on this 'Text' column.To knoow more about 'text index' go to
http://docs.oracle.com/cd/B19306_01/text.102/b14217/ind.htm
Also refer to the below thread where someone had faced issues with CONTAINS clause.
ORA-20000: Oracle Text error: DRG-10599: column is not indexed
Maybe you are looking for
-
How can I have multiple views for my question
When I posed a question on a forum, it indicates that I have one (1) view. How can I have multiple views on the same question?
-
Error message F5 727 ("Maximum number of items in FI reached"
Hi Experts, Our client is having a scenario where the different stores they have sells good which some times generate line items >999 and as such the invoice document doesn,t get posted to accounts and sits in VFX3. We had detailed discussions with t
-
Hey there, I wanted to kill two stones with one bird in this thread :P First off, whenever I open Word, I never see the standard toolbar immediately. I have to go to view, and it says it's enabled, but it's not there, and so I disable it and re-enabl
-
SCCM query not returning the results I want
I would like to use a query that will query my systems that have a particular piece of software (Flash), but I do not want it to include servers that are in a particular group. Explanation: I have about 20 servers with Flash installed that require it
-
Why can't I get iCal from my MBP to sync to the calendar on iPhone 3GS?
I can see all the different activities I have on iCal on my MBP but I can't see them on my iPhone 3GS? I use iCloud and the setting for calendar is turned on. I also refreshed my iCal and then refreshed the calendars on my iPhone. Any help is appr