Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Search and Content Type
DavidMusser
Is there any way to modify the Advanced Search Content Type on either the CC Std or CCPro to not show things like:
TeamSite/Templating/PrimaryDocumentType
TeamSite/Templating/DCR/Type
Owning Area ID etc...
I see in the Admin Guide for Windows where these are defined is in the standardFields.xml and it says:
"The standardFields.xml file is based on the standardFields.xsd schema and defines
fields for extendedAttributes and fileAttributes elements. This file cannot be edited.
You cannot redefine the fields in FieldMapping.xml that are defined in
standardFields.xml. The entries in bold in the StandardFields.xml are the relevant
extended attributes and file attributes that a search query may be issued against. The other
entries are indexed but are for Interwoven internal use only."
-D
Find more posts tagged with
Comments
jbum
David,
Those are all the indexed attributes on the server side. In order to filter some out, you need to do that
on the client layer. Specifically, you'll need to configure it with UITK.
Once you configure the list of "Content Type" items with this method, you'll "only" see those that
are configured (given that they are valid items to begin with) in the search UI.
I'll try to post more details about which config items need to configured later.
John
Member of Technical Staff
Interwoven
jbum
Hi,
The file you need to refer to is "ref_search_search.xml" under <iwhome>/local/config/lib/content_center/etc/conf. The section you need is
<!--
Screen(s): Advanced Search
Purpose: Defines the list of custom attributes available for search
on the advanced search page.
-->
<extended-attribute-list id="iw.search.attribute_list"/>
Currently, the element has no child elements. You need to specify here, which attributes you want to show up in the search UI.
For example,
<extended-attribute-list id="iw.search.attribute_list">
<extended-attribute id="Indexed" label="foobar"/>
</extended-attribute-list>
will only show the "indexed" attribute in the drop down list (as "foobar"). This is only for the regular EAs and not the templating fields.
For those, you need to perform similar configurations in the <template-types> section. This should be explained in the UITK guide.
Member of Technical Staff
Interwoven
DavidMusser
Thank you. I will try it.
-D
DavidMusser
I do not see "ref_search_search.xml" under <iwhome>/local/config/lib/content_center/etc/conf." or under lib/content_center/reference/etc/conf either...
I do see a search.xml under iw-home\httpd\webapps\content_center\WEB-INF\conf\search that have the entries you speak of.
Would I just modify that file and put it under the iw-home/local/config/lib/content_center/customer_src/etc/conf and re-build?
<!--
Screen(s): Advanced Search
Purpose: Defines the list of custom attributes available for search
on the advanced search page.
-->
<extended-attribute-list id="iw.search.attribute_list"/>
Currently, the element has no child elements. You need to specify here, which attributes you want to show up in the search UI.
For example,
<extended-attribute-list id="iw.search.attribute_list">
<extended-attribute id="Indexed" label="foobar"/>
</extended-attribute-list>
will only show the "indexed" attribute in the drop down list (as "foobar"). This is only for the regular EAs and not the templating fields.
For those, you need to perform similar configurations in the <template-types> section. This should be explained in the UITK guide.
Member of Technical Staff
Interwoven
DavidMusser
I put it under <iwhome>/local/config/lib/content_center/customer_src/etc/conf/search and then did the make_toolkit... it worked, and now I only see Foobar in the list. Now I need to look at the attributes that are there and see what my client would want to search on.
Any idea why creator is expecting an INT?
-D
jbum
I believe the reference files for search accidentally were not shipped with TS6.5. They are definitely in TS6.5 SP1 however. I've pasted the
content of the file below. Hope that helps. Instead of editing the actual search.xml, you should use the customer toolkit using this as the reference
and remunge the webapp.
John
--------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<search-config>
<!--
Screen(s): Advanced Search
Purpose: Defines the maximum number of custom fields that can be listed
on the advanced search page.
value - this should be the maximun number of fields in
multiples of four. it doesn't have to be but
keeps the UI more balanced.
-->
<custom-fields>
<property id="max-num-fields" value="20"/>
</custom-fields>
<!--
Screen(s): Advanced Search
Purpose: Defines the list of content types selectable for search
on the advanced search page. Content types consist of
file extensions, "forms", and "all", which means all file
extensions. "forms" and "all" have special meaning
and are not file extensions. All other custom types
must defined id="<file-extension>". To be able to search
on forms, you must include an entry with id="forms".
-->
<content-types id="iw.search.content_types">
<content-type id="all"/>
<content-type id="forms"/>
</content-types>
<!--
Screen(s): Advanced Search
Purpose: Defines the list of custom attributes available for search
on the advanced search page.
-->
<extended-attribute-list id="iw.search.attribute_list"/>
<!--
Screen(s): Advanced Search
Purpose: Defines the list of available templating types and
corresponding templating fields that are indexed and
searchable.
-->
<template-types id="iw.search.template_types"/>
</search-config>
Senior MTS
Interwoven
DavidMusser
We are very close :-)
I used yours, and still get the following when I search on keywords:
The following custom field requires a valid integer: Keywords (foo)
I think I need to set the type of the field. If I go back to it un-modified the GUI changes to all words when I select keywords, the date also lets you choose a date dialog box.
When I add the ones below the only choices in the middle column are = != < > <= etc.... is there a type or something else that I need to pass in?
<extended-attribute id="Indexed" label="Indexed"/>
<extended-attribute id="Indexed" label="Creator"/>
<extended-attribute id="Indexed" label="CreateDate"/>
<extended-attribute id="Indexed" label="LastModifiedDate"/>
<extended-attribute id="Indexed" label="Size"/>
<extended-attribute id="Indexed" label="Keywords"/>
-D
jbum
Maybe I should have explained better. The attribute "id" should be assigned the actual indexed attribute name.
This can be found in FieldsMapping.xml (maybe it's StandardFieldsMapping.xml, I can't remember). The field "CreatedDate"
should be assigned to "id". The "label" attribute should contain the text you want to appear in the UI. For instance,
you'd want something like the following. Also, the each id should be unique. In your example, you have all the id's set to "Indexed".
<extended-attribute id="CreateDate" label="Document Creation Date"/>
>
> <extended-attribute id="Indexed" label="Indexed"/>
> <extended-attribute id="Indexed" label="Creator"/>
> <extended-attribute id="Indexed" label="CreateDate"/>
> <extended-attribute id="Indexed" label="LastModifiedDate"/>
> <extended-attribute id="Indexed" label="Size"/>
> <extended-attribute id="Indexed" label="Keywords"/>
Senior MTS
Interwoven
DavidMusser
That was it! Thanks. It's working like a charm now:
Here's what I'm using...
<extended-attribute-list id="iw.search.attribute_list">
<extended-attribute id="Indexed" label="Indexed"/>
<extended-attribute id="Creator" label="Creator"/>
<extended-attribute id="CreateDate" label="Document Creation Date"/>
<extended-attribute id="LastModifiedDate" label="Last Modified Date"/>
<extended-attribute id="Size" label="Size"/>
<extended-attribute id="Keywords" label="Keywords"/>
</extended-attribute-list>
jbum
That's good! If you want templating fields to also be configured, you'd have to do something similar but in the template-types section.
The UITK guide should have examples that you can follow.
Senior MTS
Interwoven
Migrateduser
One thing I want to add here. Unlike other UITK xml files, the search.xml does not have a DTD, so you have to guess what's required in it. It seems that the resourceBundle is not required. But if you directly put a string value in the label attribute like what you showed there, you will get a lot of java null pointer exception in your <iw-home>/local/log/iwui/servletd_out.log file. I'm not sure if that will eventually break anything or it's harmless. But at least it's annoying. So I actually made a resourcebundle just to get rid of these exceptions.
DavidMusser
I've never made a resource bundle.. can you send me yours or a code snippet?
Migrateduser
If you have the following snippet in your search.xml file:
<content-types id="iw.search.content_types" public="true">
<content-type id="all"
label="search.content_type.all"
resourceBundle="com.interwoven.ui.search.common"
public="true"/>
<content-type id="forms"
label="search.content_type.forms"
resourceBundle="com.interwoven.ui.search.common"
public="true"/>
<content-type id="asp"
label="custom.content_type.asp"
resourceBundle="com.mycompany.custom.search_bundle"
public="true"/>
You need to create a search_bundle.properties file under <iw-home>\local\config\lib\content_center\customer_src\src\com\mycompany\custom folder. The search_bundle.properties file is just a plain text file, with entries like:
custom.content_type.asp=asp
custom.content_type.doc=doc
custom.content_type.htm=htm
custom.content_type.js=js
You need an entry in the .properties file for custom entry you added to the search.xml file with a lable. Then you need to run the make toolkit command.
Hope this helps.
DavidMusser
Perfect thanks!