Home | Oracle ECM Home Page  | Oracle ECM Documentation  | Oracle ECM Downloads  | Oracle ECM Forums  | Yahoo Intradoc Users Group Feed your aggregator (RSS 2.0)  
  Oracle Fusion ECM Blog. Are you "kuh n-tent" with your "kon-tent"?
 
 
# Monday, July 28, 2008

Sometimes we encounter the need to perform a search in content server that requires a lot of work with the <OR> query operator. Between that and a few other variables it might be possible to craft a query that is too long for content server. This happens especially with generated queries. If you are using universal query syntax or a verity engine for your search engine you might also encounter this. If the data you are searching on is metadata based you might be better off temporarily switching over to a database based search on the fly to find your results. By adding this setting to the query string you can change how content server interprets your search:

SearchQueryFormat=DATABASE

In most installations the Search Query Format setting will default to UNIVESAL. Now that you have switched over to a database based search you can set your query string using the IN operator for a much shorter query converting from something like this:

QueryText=xType <MATCHES> `A` <OR> xType <MATCHES> `B` <OR> xType <MATCHES> `C` <OR> xType <MATCHES> `D`

Into:

QueryText=xType IN (‘A’, ‘B’, ‘C’, ‘D’)

If you’re on a Database Full Text setup to start with you can still do this type of thing AND use full text like this:

QueryText=( xType IN (‘A’, ‘B’, ‘C’, ‘D’)) and  (<ftx>keyword</ftx>)

Perhaps the best thing you can do is at least take a moment to evaluate why you must have so much “or” based logic in your query in the first place. Or is almost always one of the most costly instructions.

Monday, July 28, 2008 5:50:13 AM (Central Daylight Time, UTC-05:00)  #    Comments [1]   Oracle UCM  | 
Monday, July 28, 2008 8:06:08 AM (Central Daylight Time, UTC-05:00)
Great post!
I`ve always been lazy and used OR.. never even thought of swapping query format and usind IN.
Comments are closed.
Copyright © 2009 Jason Stortz. All rights reserved.