Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
LSCS FieldMapping (how to override/customize?)
Matias
Hello,
I was trying to figure out a way to extract xml content as a searchable value in LSCS, and I ran into a hidden feature in LSCS (I could not find any documentation on this) located under /iw-cc.war/WEB-INF/conf/livesite/fieldmappings/*. There are FieldMapping files there that extract content and adds them as attributes in LSCS. There are some examples of this functionality already pre-defined such as for News and Blogs. However, the issue I'm having is on how to add my custom mappings under the customer_source folder.
The actual mapping (regex) is done in the lscs-resource-config.xml. However, it has a "default" value that catches all.
How do I override this default value so it doesnt catch my custom configurations?
Here is what's defined in the lscs-resource-config.xml:
[html]
class="com.interwoven.livesite.lscs.impl.LSCSDeploymentDescriptor">
factory-method="create">
-.*datacapture\.cfg
factory-method="create">
-.*iw/config/(taxonomy|database)/.*$
factory-method="create">
-.*templatedata/[^/]+/Content/data/.+$
factory-method="create">
-.*templatedata/[^/]+/News/data/.+$
factory-method="create">
-.*templatedata/[^/]+/Event/data/.+$
factory-method="create">
-.*templatedata/[^/]+/BlogEntry/data/.+/.+$
factory-method="create">
-.*default\.site$
factory-method="create">
-.*iwov-resources/rules+/.*(rule)$
factory-method="create">
-.*(gif|jpg|png)$
factory-method="create">
.*
[/html]
Find more posts tagged with
Comments
GRD
LSCS only allows search on metadata. The simplest way is to turn your DCR "inside out" upon save. That is, take the XML content and create EAs (probably on save).
Not pretty. I know.
-Greg
Matias
Greg,
Thanks for your answer. That *seemed* to be the way to do it, until I found the mapping files described in my post above. These mapping files do extract the data from the xml (via xpath) and indexes it as a searchable item in LSCS.
Here is how NewsFieldMappings.xml look:
[html]
?xml version="1.0" encoding="UTF-8"?>
[/html]
GRD
This is very cool, Matias. I will have to try it.
-Greg