WildCard with And
531177Oct 20 2006 — edited Oct 24 2006Can 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