Contains operator in a text query
Anybody knows how to query a text contains '>' and '&'?
For exsample, I have following table:
Create table test(a clob);
then insert following records and create a text context index on column a:
insert into test values('test a>b');
insert into test values('test a<b');
create inder test_idx on test(a) indextype is ctxsys.context;
when I issues:
select * from test where contains (a, 'a\>b')>0;
both records are returned
following query returns two records too:
select * from test where contains (a,'a<b')>0;
Also, can anyone tell me how to insert '&test' as a string into test? how to escape those sepcial charactors in contains? Say, what if I need to find all the records contains 'or' ?
Thanks
For inserting a value containing an ampersand (&), set define off. For searching for "or", perhaps instr is more appropriate than contains. For the rest of it, I played around with it and the following seemed to work, but I am not real sure about it. I didn't have any luck with the escape that usually works with regular select statements without contains.
scott@ORA92> Create table test(a clob)
2 /
Table created.
scott@ORA92> insert into test values('test a>b')
2 /
1 row created.
scott@ORA92> insert into test values('test a<b')
2 /
1 row created.
scott@ORA92> set define off
scott@ORA92> insert into test values('&test')
2 /
1 row created.
scott@ORA92> insert into test values('this or that')
2 /
1 row created.
scott@ORA92> select * from test
2 /
A
test a>b
test a<b
&test
this or that
4 rows selected.
scott@ORA92> begin
2 ctx_ddl.create_preference('my_lexer','BASIC_LEXER');
3 ctx_ddl.set_attribute('my_lexer','printjoins','>');
4 end;
5 /
PL/SQL procedure successfully completed.
scott@ORA92> create index test_idx
2 on test(a) indextype is ctxsys.context
3 parameters ('lexer my_lexer')
4 /
Index created.
scott@ORA92> select * from test where contains (a, '{a>b}')>0
2 /
A
test a>b
1 row selected.
scott@ORA92> select * from test where contains (a,'{a<b}')>0
2 /
A
test a<b
1 row selected.
scott@ORA92> select * from test where instr (a,'or')>0
2 /
A
this or that
1 row selected.
scott@ORA92> exec ctx_ddl.drop_preference('my_lexer')
PL/SQL procedure successfully completed.
scott@ORA92> drop table test
2 /
Table dropped.
Similar Messages
-
How to use 'about' operator in Full text search query?
Hi all,
I have to search the following string in full text index using 'about' operator.
'Advertisment(Cosmetics) Assets'
If use the following query
SELECT keyword_id
FROM mam_keyword_languages
WHERE contains(fts_text_uc, convert('about(Advertisment(Cosmetics) Assets)',
'WE8MSWIN1252', 'WE8MSWIN1252')) > 0
ORDER BY nlssort(text, 'NLS_SORT=EEC_EUROPA3')
It gives following error.
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 37
How can i do this search? Is there any other way?
Thanx in advance.
T.UmapathySum((postab.subtotal)*(loc.royalty)/100)
Is there any other way to take product of two
attributs? your help will be greatly appreciated as
it is really stumbling block in my project. Thanks in
advanceSuch a stumbling block should have inspired more activity on your part.
I'd try rewriting it like this:
sum(postab.subtotal*loc.royalty/100)[/b]% -
Context index and contains operator syntax how it works ?
Hi
I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
of the same table content.
When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
This query works:
SELECT * FROM content WHERE cod_type = '1'
AND (UPPER(title) LIKE UPPER('%tabagismo%')
OR contains (text, 'tabagismo',1)>0
This not works:
SELECT * FROM content
WHERE cod_type = '1' AND (
UPPER(title) LIKE UPPER('%tabagismo%')
OR contains (text, 'tabagismo',1)>0
OR contains (text_citizen,'tabagismo',1)>0
OR contains (text_gest,'tabagismo',1)>0
OR contains (text_prof,'tabagismo',1)>0
How can i fix it ?
I need to query all these colluns !
Does the contains operator can be used only in one collumn?
Thank´s in advanceHi
I create a context index on four collumns (text_prof, text_gest, text_citizen, text)
of the same table content.
When i have more than one collumn being queryed using the contains syntax, oracle display the ora 29907 error saying found duplicated labels in primary invocations .
This query works:
SELECT * FROM content WHERE cod_type = '1'
AND (UPPER(title) LIKE UPPER('%tabagismo%')
OR contains (text, 'tabagismo',1)>0
This not works:
SELECT * FROM content
WHERE cod_type = '1' AND (
UPPER(title) LIKE UPPER('%tabagismo%')
OR contains (text, 'tabagismo',1)>0
OR contains (text_citizen,'tabagismo',1)>0
OR contains (text_gest,'tabagismo',1)>0
OR contains (text_prof,'tabagismo',1)>0
How can i fix it ?
I need to query all these colluns !
Does the contains operator can be used only in one collumn?
Thank´s in advance -
How to use "Contains" operator
Hi All,
I'm trying to use oracle text with the Contains operator. But I'm experiencing troubles.
When I have only one condition with the Contains operator the query works fine :
SELECT ObjectID
FROM T_Object
WHERE Contains (Title, 'english', 1) > 0
But when I add a second contains clause it does not work anymore:
SELECT ObjectID
FROM T_Object
WHERE Contains (Title, 'english', 1) > 0
OR Contains(ShortDescription, 'english', 1) > 0;
here is the error message :
ERROR LINE 4 :
ORA-29907: Double lables detected in primary calls.
I must admit that the error message is quite clear but I still can't understand why the query does not work.
Any help will be very appreciated.
Kind regards.Change the label in the 'OR' part of the select statement and try.
SELECT ObjectID
FROM T_Object
WHERE Contains (Title, 'english', 1) > 0
OR Contains(ShortDescription, 'english', 1) > 0;
Try:
SELECT ObjectID
FROM T_Object
WHERE Contains (Title, 'english', 1) > 0
OR Contains(ShortDescription, 'english', 2) > 0; -
DRG-50901: text query parser syntax error
The query
SELECT * FROM ij
where
CONTAINS (ij.summary, 'ATTENZIONE!') > 0 returns an error:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 13
Why?
There is a TEXT index on the summary column:
CREATE INDEX IJL_SUMMARY_IX ON IJ
(SUMMARY)
INDEXTYPE IS CTXSYS.CONTEXT
PARAMETERS('
lexer MITO_LEXER
wordlist DEFAULT_WORDLIST
stoplist IJL_STOPLIST
storage IJL_TEXT_STORAGE
SYNC (EVERY "SYSDATE + 10/1440")')
PARALLEL ( DEGREE 4 INSTANCES 1 );where the MITO_LEXER is
BEGIN
CTX_DDL.create_preference ('mito_lexer', 'BASIC_LEXER');
CTX_DDL.set_attribute ('mito_lexer', 'INDEX_STEMS', 'ITALIAN');
-- MITO-318: search on Text Index for Asterisks
CTX_DDL.set_attribute ('mito_lexer', 'printjoins', '*');
END;
/Because the exclamation mark ("!") is a reserved operator, meaning soundex, and must appear before the word it applies to.
-
Checking text query validity without actually running the query: ideas?
Hi,
I would like to implement a sort of function that does a preliminary check on the validity of the search string and ideally this function should work with both CTXCAT and CONTEXT indexes (and grammars).
Initially I thought that CTXQUERY.EXPLAIN function could do this for me, but, unless I am missing something, it only works with CONTEXT indexes and it doesn't accept a string containing a text query rewrite using CTXCAT grammar (it throws DRG-11119: operation is not supported by this index type).
Plan B would be to create an empty table with a CONTEXT index and then run the query either with the CONTEXT grammar or the CTXCAT grammar via query rewrite and if the query runs, returning no rows, presumably fast enough for this purpose, then the query string is assumed to be valid.
What I don't like much about plan B is the need for an additional table plus the "dummy" context indexes just to perform the parsing of the text query, but so far I didn't come up with more brilliant ideas.
Any thoughts?
Am I missing something that does the magic without hassle?
Thanks
FlavioUnder normal circumstances I wouldn't do this, as you say I'd just run the query and catch the error, but I need to do this inside a report refresh performed via AJAX (using Oracle Apex) and the catch is that when such refresh fails owing to a syntax error, the partial refresh mechanism of APEX becomes broken, so even if you amend the query and submit a new valid string, it won't show up any more.
That's why I need to be sure that the string is valid before running the query, hence the syntax checking function.
The google-style parser sounds interesting, may be I can try to implement it in a future release of my app!
Thanks
Flavio -
Container operations and abstract interfaces
Hi
At first, could somebody maybe refer to blogs about how to exploit fault messages in BPM? (how to generate an fault response when a exception is thrown and handled)
As I could not find a fast way to see how fault messages work in BPM I tried to solve the problem the other way... but run into a problem again. The question is: is it possible to assign values to some elements in an abstract interface type container? Like put into the message a processing code, processing time or some other informative text.
In a more technical way: container operation allows only the whole container to be the target of the operation, while one can use any part of an container (of abstract interface) to use as the source of operation. Is it also possible to assign a value to a element in abstract interface?
Waiting for any ideas...Hi
Thanks for Your answer. Still my question is unanswered. As You could read out from my question, I know that such a step exists but the problem is that target can be exactly one container. Its hard to make an example without too much of code samples.
I agree that if I have containers A and B then I can do:
A = B
But if A is of type abstract interface with structure:
rootNode
+ childNode1
+ anElement as xsd:string
+ childNode2
and B is a simple type then is it possible to do something like:
A:/rootNode/childNode1/anElement = B
As I don't want to change anything else in the response. Any ideas?
I need to do so because I am not able to throw fault messages as a synchronous interface response (first: there is no way to define fault type as abstract interface, second: send [close S/A bridge] step needs response message only).
Another way would be to replace response content by inserting fault information but as there is no way but message mappings (transformation step) to change the content of an abstract interface (is there?). It would be a very ugly solution - each fault in BPM shall have its own mapping that generates the whole message... and there would be other issues too.
Waiting for any ideas on how to solve the problem.
Any recomendations how to create a SOAP fault answer in BPM are also welcome! -
Oracle Text query: Escaping characters and specifying progression sequences
How can I combine the escaping of a search string and the specification of progression sequences within an oracle text query
so that in all cases the correct results are delivered (see example below)?
The scenario in which to use this is the following:
+ Database: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0
+ Requirement: Hitlist of results ordered by score whereby the different part within
the result list are specified using progression sequences within oracle text query
Example:
create table service_provider (
id number,
name_c varchar(100),
uri_c varchar(255)
insert into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de');
insert into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de');
insert into service_provider values (3,'SABBATA United','http://www.sabbata-united.de');
insert into service_provider values (4,'ABB','http://www.abb.de');
insert into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de');
insert into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de');
insert into service_provider values (7,'SANDATA United','http://www.sandata-united.de');
insert into service_provider values (8,'AND','http://www.and.de');
Query 1: works correctly in this case
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>abb</seq>' ||
'<seq>abb%</seq>' ||
'<seq>%abb%</seq>' ||
'<seq>fuzzy(abb,1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
51 2 Dr. Abbas Ming http://www.dr-abbas-ming.de
26 3 SABBATA United http://www.sabbata-united.de
Query 2: procudes error
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>and</seq>' ||
'<seq>and%</seq>' ||
'<seq>%and%</seq>' ||
'<seq>fuzzy(and,1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
produces ORA-29902, ORA-20000, DRG-50901 because AND is a reserved word in oracle text
So we need escaping ...
Query 3: does not work correctly
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>{abb}</seq>' ||
'<seq>{abb%}</seq>' ||
'<seq>{%abb%}</seq>' ||
'<seq>fuzzy({abb},1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
Query 4: does not produce an error, but also does not work correctly
select * from (
select /*+ FIRST_ROWS */ score(1), this_.*
from service_provider this_
where
CONTAINS ( this_.NAME_C , '<QUERY><textquery grammar="CONTEXT">' ||
'<progression>' ||
'<seq>{and}</seq>' ||
'<seq>{and%}</seq>' ||
'<seq>{%and%}</seq>' ||
'<seq>fuzzy({and},1,100,WEIGHT)</seq>' ||
'</progression></textquery></QUERY>', 1 ) > 0
order by score(1) desc, this_.NAME_C
) where rownum < 21
delivers
76 8 AND http://www.and.de
76 5 AND Company Mgmt http://www.and-company-mgmt.deAnywhere that you just use the word by itself, enclose it in {}, but anywhere that you add % on either side or both don't enclose it in {}. Please see the demonstration below.
SCOTT@10gXE> SELECT * FROM v$version
2 /
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SCOTT@10gXE> create table service_provider
2 (id number,
3 name_c varchar(100),
4 uri_c varchar(255))
5 /
Table created.
SCOTT@10gXE> insert all
2 into service_provider values (1,'ABB Company Mgmt','http://www.abb-company-mgmt.de')
3 into service_provider values (2,'Dr. Abbas Ming','http://www.dr-abbas-ming.de')
4 into service_provider values (3,'SABBATA United','http://www.sabbata-united.de')
5 into service_provider values (4,'ABB','http://www.abb.de')
6 into service_provider values (5,'AND Company Mgmt','http://www.and-company-mgmt.de')
7 into service_provider values (6,'Dr. Andas Ming','http://www.dr-andas-ming.de')
8 into service_provider values (7,'SANDATA United','http://www.sandata-united.de')
9 into service_provider values (8,'AND','http://www.and.de')
10 into service_provider values (9,'EBB','fuzzy test')
11 into service_provider values (10,'OND','fuzzy test')
12 select * from dual
13 /
10 rows created.
SCOTT@10gXE> CREATE INDEX your_index
2 ON service_provider (name_c)
3 INDEXTYPE IS CTXSYS.CONTEXT
4 PARAMETERS ('STOPLIST CTXSYS.EMPTY_STOPLIST')
5 /
Index created.
SCOTT@10gXE> VARIABLE search_string VARCHAR2 (100)
SCOTT@10gXE> EXEC :search_string := 'abb'
PL/SQL procedure successfully completed.
SCOTT@10gXE> COLUMN name_c FORMAT A20 WORD_WRAPPED
SCOTT@10gXE> COLUMN uri_c FORMAT A40
SCOTT@10gXE> select *
2 from (select /*+ FIRST_ROWS */ score(1), this_.*
3 from service_provider this_
4 where CONTAINS
5 (this_.NAME_C ,
6 '<QUERY>
7 <textquery grammar="CONTEXT">
8 <progression>
9 <seq>{' || :search_string || '}</seq>
10 <seq>' || :search_string || '%</seq>
11 <seq>%' || :search_string || '%</seq>
12 <seq>fuzzy({' || :search_string || '},1,100,WEIGHT)</seq>
13 </progression>
14 </textquery>
15 </QUERY>', 1 ) > 0
16 order by score(1) desc, this_.NAME_C)
17 where rownum < 21
18 /
SCORE(1) ID NAME_C URI_C
76 4 ABB http://www.abb.de
76 1 ABB Company Mgmt http://www.abb-company-mgmt.de
51 2 Dr. Abbas Ming http://www.dr-abbas-ming.de
26 3 SABBATA United http://www.sabbata-united.de
4 9 EBB fuzzy test
SCOTT@10gXE> EXEC :search_string := 'and'
PL/SQL procedure successfully completed.
SCOTT@10gXE> /
SCORE(1) ID NAME_C URI_C
76 8 AND http://www.and.de
76 5 AND Company Mgmt http://www.and-company-mgmt.de
51 6 Dr. Andas Ming http://www.dr-andas-ming.de
26 7 SANDATA United http://www.sandata-united.de
5 10 OND fuzzy test
SCOTT@10gXE> -
Hi,
I have a View object with various attributes (eg, name1, name2, name3, address1, address2, address3 etc). A query/table component based on this view object works just fine. However, I wish to replace name1, name2, name3 and other attributes in the query with just 'name'. These attributes are still to be shown in the result table. This new 'name' attribute will be used in an Oracle Text query clause, instead of individual searches on each attribute.
My plan was to simply make the various name1, name2 etc attributes non-'queryable' in the View def to hide them from the query. Then I'd add a transient 'name' attribute. My hope was, that I could override the getWhereClause() in the ViewObjectImpl and simply tack on the oracle text clause to the WHERE (example below):
WHERE CONTAINS (
SOMECOLUMN,
'<query>
<textquery lang="ENGLISH" grammar="CONTEXT">TRANSIENT_ATTR_VALUE
..... Oracle Text query grammar stuff here .... </query>') > 0How do I access the transient value in the ViewObjectImpl to add the above SQL? Or am I going about this in completely the wrong way?
thanks,
Barry.Based on what I found in
http://www.oracle.com/technology/oramag/oracle/09-nov/o69frame.html?_template=/ocom/print
and
http://blogs.oracle.com/smuenchadf/examples/
136. Introducing a Checkbox to Toggle a Custom SQL Predicate on an LOV's Search Form. [11.1.1.0.0] 19-NOV-2008
I have the following implementation, which seems to work. Does anyone see any problems with this?
With regard to SQL injection, does ViewCriteriaItem sanitise the 'val' from the query, or should I do that manually here myself?
@Override
public java.lang.String getCriteriaItemClause(ViewCriteriaItem vci) {
if ("OraTextTransientAttrib".equals(vci.getAttributeDef().getName())) {
if (vci.getViewCriteria().isCriteriaForQuery()) {
String val = (String)vci.getValue();
logger.debug("Doing oracle text name search on '" + val + "'");
// simplified version of my oracle text query
return "CONTAINS ('<query>..... " + val + "....</query>') > 0 ";
} else {
// SQL predicate for no changes to the results
// spaces needed if you have several of these blocks
return " 1=1 ";
// other blocks for other similar oracle text attribs
return super.getCriteriaItemClause(vci);
} -
Segfaulting on full container operations - debugging help
Hi all -
I have some data that has been through lots of dbxml upgrades and the last two upgrades have full container operations segfaulting. I was able to ignore this data for a year but now its coming back to haunt me. All full container operations, such as reindex, add/remove index, and trying to dump all data either through dump or getDocuments segfault. It's data specific and my container is 16GB. I want to be able to provide more info that the basic gcc stacktrace but I'm not sure. I have recompiled dbxml and bdb with debug flags but I'm not sure where to go from there - I get more or less the same undetailed information on the bug (below). Is it because I'm running the test through the shell? I want to help myself but its been quite some time since I have written any C++. If there is ANY other way to get my documents out of this DB I'm happy to dump and reload but everything segfaults that I can think of. I'm sure its just an ancient data issue.
Thanks in advance!
#0 0x00002b1b0d060f80 in DbXml::NsFormat::unmarshalInt64 () from /usr/local/xmldb/lib/libdbxml-2.5.so
#1 0x00002b1b0d077a21 in DbXml::NsRawNode::setNode () from /usr/local/xmldb/lib/libdbxml-2.5.so
#2 0x00002b1b0d05cecb in DbXml::NsEventReader::getNode () from /usr/local/xmldb/lib/libdbxml-2.5.so
#3 0x00002b1b0d05d07f in DbXml::NsEventReader::endElement () from /usr/local/xmldb/lib/libdbxml-2.5.so
#4 0x00002b1b0d05d355 in DbXml::NsEventReader::next () from /usr/local/xmldb/lib/libdbxml-2.5.so
#5 0x00002b1b0d049625 in DbXml::EventReaderToWriter::doEvent () from /usr/local/xmldb/lib/libdbxml-2.5.so
#6 0x00002b1b0d049a92 in DbXml::EventReaderToWriter::start () from /usr/local/xmldb/lib/libdbxml-2.5.so
#7 0x00002b1b0d133cc8 in DbXml::DocumentDatabase::reindex () from /usr/local/xmldb/lib/libdbxml-2.5.so
#8 0x00002b1b0d103d61 in DbXml::Container::reindex () from /usr/local/xmldb/lib/libdbxml-2.5.so
#9 0x00002b1b0d10ad72 in DbXml::Container::setIndexSpecificationInternal () from /usr/local/xmldb/lib/libdbxml-2.5.so
#10 0x00002b1b0d10b648 in DbXml::Container::setIndexSpecification () from /usr/local/xmldb/lib/libdbxml-2.5.so
#11 0x00002b1b0d16f1a0 in DbXml::XmlContainer::setIndexSpecification () from /usr/local/xmldb/lib/libdbxml-2.5.so
#12 0x00002b1b0d16f52b in DbXml::XmlContainer::deleteIndex () from /usr/local/xmldb/lib/libdbxml-2.5.so
#13 0x000000000040f67e in DeleteIndexCommand::execute ()
#14 0x0000000000427475 in Shell::mainLoop ()
#15 0x000000000042c7f9 in main ()Hi Vyacheslav -
Sorry to not have the line number - I was having some missing magic incantations in my library loading so it wasn't finding the symbols. Full bt with line number is below. I'll look into this as well but if you've seen this before I'd be happy to hear about it! BTW, when not run in debug this is a SEGFAULT but when run under debug its an assertion error. I am using the exact same test case and getting different results.
No idea what the first version was - it was about 5 years ago. Everything worked fine until the 2.5.16 upgrade, which happened to fix bugs that OTHER containers were having so it was a must. I can go document by document but I literally have 16GBs of documents (49307 docs). I get the segfault when I try to do any full container query so getting all ids for example isn't working. I'll keep plugging on this part - was just looking for a cursor-ish way to find out which one is making things upset.
Thanks again
Liz
#0 0x00000037dec30265 in raise () from /lib64/libc.so.6
#1 0x00000037dec31d10 in abort () from /lib64/libc.so.6
#2 0x00002b1f3fb24a27 in DbXml::assert_fail (expression=0x2b1f3fba1bc2 "data.data", file=0x2b1f3fba1ae0 "src/dbxml/nodeStore/NsEventReader.cpp", line=665) at src/dbxml/DbXmlInternal.cpp:21
#3 0x00002b1f3fa3c3cf in DbXml::NsEventReader::getNode (this=0x7fff7e6887b0, parent=0x27215420) at src/dbxml/nodeStore/NsEventReader.cpp:665
#4 0x00002b1f3fa3c648 in DbXml::NsEventReader::endElement (this=0x7fff7e6887b0) at src/dbxml/nodeStore/NsEventReader.cpp:874
#5 0x00002b1f3fa3c7ae in DbXml::NsEventReader::next (this=0x7fff7e6887b0) at src/dbxml/nodeStore/NsEventReader.cpp:508
#6 0x00002b1f3fa2307c in DbXml::EventReaderToWriter::doEvent (this=0x7fff7e6886e0, writer=0x7fff7e6889b0, isInternal=true) at src/dbxml/nodeStore/EventReaderToWriter.cpp:160
#7 0x00002b1f3fa23955 in DbXml::EventReaderToWriter::start (this=0x7fff7e6886e0) at src/dbxml/nodeStore/EventReaderToWriter.cpp:146
#8 0x00002b1f3fa5b15c in DbXml::NsWriter::writeFromReader (this=0x7fff7e6889b0, reader=@0x7fff7e6887b0) at src/dbxml/nodeStore/NsWriter.cpp:104
#9 0x00002b1f3fa25d0b in DbXml::NsDocumentDatabase::getContent (this=0x167b7180, context=@0x16a84368, document=0x16a842d0, flags=0) at src/dbxml/nodeStore/NsDocumentDatabase.cpp:111
#10 0x00002b1f3fb2b409 in DbXml::Document::id2dbt (this=0x16a842d0) at src/dbxml/Document.cpp:888
#11 0x00002b1f3fb2e267 in DbXml::Document::getContentAsDbt (this=0x16a842d0) at src/dbxml/Document.cpp:530
#12 0x00002b1f3fb8017d in DbXml::XmlDocument::getContent (this=0x16a844a8, s=@0x7fff7e688c60) at src/dbxml/XmlDocument.cpp:145
#13 0x00002b1f3fb197c9 in DbXml::DbXmlNodeValue::asString (this=0x16a84490) at src/dbxml/Value.cpp:507
#14 0x00002b1f3fb8a263 in DbXml::XmlValue::asString (this=0x7fff7e689010) at src/dbxml/XmlValue.cpp:299
#15 0x000000000040d16a in PrintCommand::execute (this=0x167a7a90, args=@0x7fff7e689160, env=@0x7fff7e689880) at src/utils/shell/PrintCommand.cpp:83
#16 0x0000000000427dda in Shell::mainLoop (this=0x7fff7e689900, in=@0x7fff7e689240, env=@0x7fff7e689880) at src/utils/shell/Shell.cpp:66
#17 0x0000000000416d4b in IncludeCommand::execute (this=0x167a7870, args=@0x7fff7e689580, env=@0x7fff7e689880) at src/utils/shell/IncludeCommand.cpp:56
#18 0x0000000000427dda in Shell::mainLoop (this=0x7fff7e689900, in=@0x647790, env=@0x7fff7e689880) at src/utils/shell/Shell.cpp:66
#19 0x000000000042eac0 in main (argc=1, argv=0x7fff7e689ad8) at src/utils/shell/dbxmlsh.cpp:248
Edited by: eleddy on Feb 22, 2011 2:39 PM -
I want to know the CONTAINS ? whats the purpose of it ? How to use it ? Whether we need to create any index for using the CONTAINS in query ?
Text indexes are used for searching a word in CLOB fields. Very useful and it is very fast in giving the output.
consider a table lib_verb having a column lib_verb_cli which is clob columns in "adm" user.
"sfe" user wants to search some string from this table lib_verb.
They can do as
select * from adm.lib_verb a
where contains(a.lib_verb_cli, 'Noise') > 1Advantages:
· Query retrieval is very fast.
· The search not worried about upper case and title case and it is giving the expected result.
S -
Hello guys,
I rather need an advice and my experience with the Oracle forums has always been auspicious.
I am using jDeveloper 11gR2 and Oracle database 11.2.0.1. Running the following query I have a view object based on that query and a search form with results table.
SELECT
SEEKER.SEEKER_ID SEEKER_ID,
SEEKER.CV CV,
SCORE(1)
FROM
SEEKER
WHERE CONTAINS(CV, '<query>
<textquery lang="ENGLISH" grammar="context">' ||
GET_RELATED_CATEGORIES(:keyword) ||
'</textquery>
<score datatype="INTEGER"/>
</query>', 1) > 0
GET_RELATED_CATEGORIES is a function which returns concatenated strings querying some semantic data in my database. The problem is when GET_RELATED_CATEGORIES returns null the "text query parser" is throwing an exception (that is how it is supposed to act).
I am asking for any suggestions for the implementation of that functionality and will be really grateful. Shall I export the whole query in a remote procedure and maybe call it as a web service or there is any other better solution (maybe some checks).
Thank you in advance!I see two possible ways you can try.
1. cause the function in a way that no null value is returned (return an empty string '')
2. put a nvl (get..., '') around the function
Timo -
Full text query across multiple columns
In the SQL Server, when you do the full text query, you can specify multiple columns, e.g.
FREETEXT ( { column_name | [b](column_list) | * } , 'freetext_string' [ , LANGUAGE language_term ] )
CONTAINS ( { column_name | [b](column_list) | * } , '< contains_search_condition>' [ , LANGUAGE language_term ])
Where,
column_list Indicates that several columns, separated by a comma, can be specified...
* Specifies that all columns in the table registered for full-text searching should be used to search for the given contains search condition. The columns in the CONTAINS clause must come from a single table...
That makes full text query cross multiple columns very convenient. Are there any mechnisms in Oracle to do the same thing?
Thanks in advance.Thanks for your reply.
I knew that you could build full text index for the multiple columns using Oracle Text. But that does not solve my problem, which is how to build the query to search multiple columns at once. Say, I have columns firstname, lastname, address, and email in the table customers. I want to get the results that ANY column contains 'bob'. In SQL Server, I can do
select * from customers where contains(*, 'bob')
that is. But for Oracle, I have to do
select * from customers where contains('firstname', 'bob') or contains('lastname', 'bob') or contains('address', 'bob') or contains('email', 'bob')
Can you imagine if I have many columns in many tables and I have to do the query against all columns in all tables? I have to dynamically get all the columns and then build the query string.
So, any better solutions? -
Store Filename in Container Operation of BPM?
Hi,
Is it possible to store filename in Container Operation of BPM step? I know that using mapping and assigning that field to Container Operation can be done.
But, is it possible to do without using payload field assignment?
Regards,
AshishThat seems to be the only possible way. Bcoz the filename in the dynamic header is lost when the message enters BPM.
Regards,
Prateek -
Passing expression values to a container operation
hello,
I have a question about passing values to a expression in a container operation. we have a container operation that has a hard coded value for a expression value. we are using a result element of offset days and the expression value is 4. sometimes we want to have this value as a different number. when we do this we have to change the expression value, create a transport , then move thru quality and then prod. is there a way to have the the expression value passed as a variable to the workflow?
if the value could be in a custom table that could be changed when ever it was needed and the workflow would read the value from the table.
I am not fimilar with workflow so the suggestion that I have above might not be correct but I am looking for something on the order of this. if there is a way to accomplish this without having to change the workflow and move it through quality and then production that would be ideal.
thanks in advance for the help.Marcos Suarez wrote:
It is really a bad idea to use a Container operation step to get a variable value.
Why? I disagree, using a task has a far greater performance overhead with hardly any benefit, a functional method in a conainer operation is much more efficient. It also makes your workflow a little bit easier to follow.
Unless I misunderstood something?
Edit: For the benefit of the original question, there are examples of how to do exactly this (functional method to retrieve/assign values) in the second edition of "Practical Workflow for SAP". And since proceeds go to charity, getting a copy is doubly worthwhile.
Edited by: Mike Pokraka on Feb 3, 2011 1:55 PM
Maybe you are looking for
-
Multiple instances of OC4J on the same machine
Is there a way to cofigure OC4J to have a few processes on the same machine, all listening to the same ports? My purpose is to develope and deploy a few applications on the same machine, and each application should has its own process, so if onw fail
-
Down payment functionality for PO with account assignment K Cost Center
QUESTION: Is there a way to turn-on down payment functionality for cost centers? When a vendor down payment is posted via tcode F-47 against a PO line item with INTERNAL ORDER as the account assignment, SAP posted the following documents from the pay
-
this is the correction to the article. REPLACE .itl and .xml files . itunes will not open without them. .itl especially long story of broken Macbook Pros. new one and the external drive had the only copy of iTunes. i had music on various drives so i
-
Maximum package size for data packages was exceeded?
Hi Experts, I am facing this problem "Maximum package size for data packages was exceeded". When I am trying to laod. I even tried to reduce data packet and change DTP settings in EXtraction to Get All New Data Request by Request but still same error
-
Cannot load certain websites, cannot find fix
I've noticed I cannot load 2 specific websites through Firefox: www.bankofinternet.com and www.quiksilver.com these sites will not load in any other browser on my computer as well. I've tried loading the pages directly & through google search. I've t