Search by extension and Title with a targeted Quick Search

Often when I'm doing a search, I'm doing it based on something in the Title.  But in addition to that, I often know the extension of the original (native) file I'm looking for as well.  I'll know if it's a PowerPoint I'm after...or maybe a zip file. The quickest way for me to do my searching is with the Quick Search in the top right.  So what I've done is created a targeted Quick Search to search by both the extension and the Title.   You can do this either as your own individual quick search or an administrator can set it up as a quick search that all users can use. 

  1. Go to My Content Server -> My Quick Searches.  If you are an administrator, you should be able to create new quick searches defined by admins.

    Quick Search

  2. Click Create New...
  3. If you have the expanded search form enabled, select Search Forms -> Query Builder Form.

    Query Builder Form

  4. Enter a Quick Search Key and Label. 

    Key and Label

  5. In the Query Builder section, click 'show advanced options'. 
  6. In the Query Text box, click 'Modify Query Text and add the following code:

    <$rsMakeFromString('myParms','#s','myParm')$><$loop myParms$><$if myFirst$> <AND> dDocTitle <contains> `<$myParm$>` <$else$><$myFirst=1$>dExtension <starts> `<$myParm$>`<$endif$><$endloop$>



  7. Click Save. 

Now when you do a quick search, you can either select the type of quick search:

select quick search

Or use the key to specify it:

quick search by key

And if you want to search by just the extension, you can leave off the comma and Title parameter.

Comments:

Hello,
Thanks for your intresting articles.
I tried this one but I have an error when I launch the search :
Unable to retrieve search results. Parsing error at character 60 in query: "dExtension <starts> `doc` <AND> dDocTitle <contains> ` Test`". Unable to find parsed elements with engine label 'DATABASE.METADATA.ORACLE', field name 'dDocTitle', operator name 'hasasword'.

I don't understand where is the problem. Can you please help me ?
Many thanks.

Posted by guest on January 12, 2012 at 04:53 AM CST #

Yes, I should have made mention of this in the article. If your search engine is configured for DATABASE.METADATA or DATABASE.FULLTEXT and you use the <contains> operator, you need to have the 'DBSearchContainsOpSupport' component enabled. If you are using OracleTextSearch component, then the <contains> operator is natively supported. In the example above, you can also use other oprators such as <starts> or <matches>. Hopefully this resolves the issue.

Thanks,
-Kyle

Posted by Kyle Hatlestad on January 13, 2012 at 08:31 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today