Forum OpenACS Q&A: MINUS operator in Oracle Text

Collapse
Posted by anu benis on
Problems with the MINUS operator in Oracle Text

We have created a search engine with Oracle 9i/Oracle Text/Tomcat Server.

Everything is working fine except for one glitch.

There is a MINUS operator, the hyphen that is in-built.

Our search application searches for words such as FND-123, with the hyphen. In this case I do not want the hyphen to act as an operator and I do not want to escape sequence it too. The whole word “FND-123” has to be searched for in the database.

Is there a way to disable this operator in Oracle Text?

I found the following in one of the Oracle Text documents, 9ir2text_features_overview.pdf:
Intelligent match
• Search for a document that is about something - Oracle Text’s unique knowledge base describes the themes of each document. You can then search by theme, and find documents that are about your search term. For example, a document may contain the word “car” without being about cars: similarly, a document may be about cars – mentioning coupes, convertible, sedan – without containing the word “car”.
• Ignore noise-words such as “the”, “of”. A default list of noise words (a stop list) is supplied for each major European language. You may alter supplied stop lists, or define your own. You may also choose to ignore a class of characters.
---->
• Handle non-alphanumeric characters – for example, you may choose to count “-“ as a part of a word for search purposes, so that you can search on part numbers like aaa-9999-bbb. Another example is searching for “C++”.
---->

This tells me that searching for a word with the hyphen is possible; however it does not tell me how to do it.

Could anyone throw some light on how to get this working? This is kind of a critical requirement in our application and would appreciate a response.

Collapse
Posted by Patrick Giagnocavo on
If you were using OpenACS, this would have been done for you automatically via the support for "bind variables".

As you are doing things in Java (at least I assume so since you mention Tomcat), you will have to figure out how to set bind variables in Java.