Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

WildCard with And

531177Oct 20 2006 — edited Oct 24 2006
Can someone please help me. I know some stuff about Oracle Text and then it seems like when I get it figured out something else breaks. I know "And" is a stopword so I've made my own stopword list and made "and" a regular word

This is my contains statement;

AND CONTAINS (location, '%BRICK {AND}%
OR $(SYN(BRICK) AND SYN({AND}))
OR ?(SYN(BRICK) AND SYN({AND}))
OR !(SYN(BRICK) AND SYN({AND})) ',1) > 0)

The Problem is I get a "WildCard error to many"

However

If I do this;
AND CONTAINS (location, '{%BRICK AND%}
OR $(SYN(BRICK) AND SYN({AND}))
OR ?(SYN(BRICK) AND SYN({AND}))
OR !(SYN(BRICK) AND SYN({AND})) ',1) > 0)

No Errors. I get two records back.
or this

AND CONTAINS (location, '%AND%
OR $(SYN({AND}))
OR ?(SYN({AND}))
OR !(SYN({AND})) ',1) > 0)


No Errors. I get records back.

I don't understand this. In the first contains it looks for a word or a word with "brick" in it and then the word "and" and then another word.

The second contains looks for any words that has a word with or without "brick" , "and" in a word or not, and then anything else.

Is this right or am I misunderstanding something. I only have about 47,000 records in the table so I can't understand why I am getting this error.

These are my preferences

begin
ctx_ddl.create_preference('PREF_SOUNDEX', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_INDEX','TRUE');
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MIN_LENGTH',3);
ctx_ddl.set_attribute('PREF_SOUNDEX','PREFIX_MAX_LENGTH',15);
ctx_ddl.set_attribute('PREF_SOUNDEX','SUBSTRING_INDEX','TRUE');
ctx_ddl.set_attribute('PREF_SOUNDEX','WILDCARD_MAXTERMS',15000);
ctx_ddl.create_preference('MAF_LEXER','BASIC_LEXER');
ctx_ddl.set_attribute('MAF_LEXER','printjoins','-#&');
ctx_ddl.set_attribute('MAF_LEXER','skipjoins','(.),');
end;
/

How exactly does the substring index work? Are there to many words with "and" in them and that is why it gives me this error?

Any help is greatly appreciated

Thanks
Jeff
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2006
Added on Oct 20 2006
4 comments
2,049 views