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)
CSS 2.5 Property Search Questions
IBMer
I am using TS 6.5 SP1 with Search SP1 with CSS SDK 2.5 SP1 and have the following questions/issues:
1.) I am attempting to query for content in TeamSite 6.5 SP1 using the CSSDK 2.5 SP1 but it seems problematic.
Basically, I need to be able to perform basic property-based searches on content using the CSSDK. The following is my attempt at doing so.
I execute the following code:
CSSearchEngine sEngine = client.getSearchEngine();
CSArea areas[] = new CSArea[1];
CSVPath workArea = new CSVPath("//[server]/default/main/TeamSiteLIBranch/WORKAREA/TeamSiteLIWorkArea");
CSVPath branchPath = new CSVPath("//[server]/default/main/TeamSiteLIBranch"):
CSBranch branch = client.getBranch(branchPath,true);
CSWorkarea area client.getWorkarea(workArea,true);
CSPhraseConstraint phrase = CSPhraseConstraint("one");
CSFieldConstraint fieldConstraint = new CSFieldConstraint("TeamSite/Metadata/Description",CSOperator.EQUALS, phrase);
//I've also tried the following
// CSFieldConstraint fieldConstraint = new CSFieldConstraint("TeamSite/Metadata/Description",CSOperator.EQUALS, "one");
areas[0] = area;
CSSearchResult results = sEngine.search(Locale.getDefault(),branch,areas,fieldConstraint,5); \\line 127
I get the following error on line 127
com.interwoven.cssdk.search.CSBadQueryException: The element type "value" must be terminated by the matching end-tag "</value>".()
at com.interwoven.cssdk.search.impl.CSSearchEngineImpl.search(CSSearchEngineImpl.java:144)
Any ideas why this might be happening or how to work around it?
2.) How do I get a list of queryable property names that I can provide "property-based" queries on? I'm trying to query the out-of-the box properties and am curious as to how to programmatically get these names....like modified date, title, checking date, etc.
Find more posts tagged with
Comments
jornduff
Sorry, can't answer your questions, but maybe you can help me with a related question. I'm wanting to look into what has been exposed to the search capabilties in CSSDK 2.5 SP1, but can't find any javadocs for SP1. All I can find on the support site is the javadocs from the original 2.5 release. Anyone know if any detailed documentation like this exists for CSSDK 2.5 SP1?
image.JPG
Migrateduser
The Javadocs for CS SDK 2.5 Sp1 should have whatyou are looking for. They are available from the 'product download' section of the CS SDK on the support site. I also heard the initial javadoc posting had a problem, but that it has been corrected. If they are not there, please contact
support-admin@interwoven.com
and they can help you out.
I don't think the CS manuals were updated for Sp1.
hth
lissa
dtheimer
Installed Version TS 6.5 SP1 and Search 1.0 SP1
You can find the Java Docs: Interwoven ContentServices SDK Release 2.5. In the upper left hand corner is the package section which now includes some details on search.
The Interwoven ContentServices SDK Release 2.5 (cssdk_doc.jar) can be found on your TeamSite server in the following location: iw-home\cssdk\docs
dazzlad
Hi Lisa are there any plans to improve this documentation.
The original poster was having trouble with a CSFieldConstraint. The doc defines the value parameter as type Object which is basically anything.
CSFieldConstraint(java.lang.String name,
CSOperator operator,
java.lang.Object value)
Also, what is a 'Field', I have found out that it can be an indexed extended attribute but only by a **** of a lot of trial and error.
Darren.
dazzlad
Hi.
I know this is an old post, but I always like to find the solution when I search a devnet thread.
So...
I think the problem with what you had was:
CSPhraseConstraint phrase = new CSPhraseConstraint("one");
CSFieldConstraint fieldConstraint = new CSFieldConstraint("TeamSite/Metadata/Description",CSOperator.EQUALS, phrase)
needs to be:
CSFieldConstraint fieldConstraint = new CSFieldConstraint("myAttrib/UniqueId", new CSPhraseConstraint("811129ed257d560f5aafcfc2e0018fa173de"));
I think if you are constructing a constraint using three parameters including an operator, you are supposed to just specify a string value rather than an object, but I couldn't get the equals operator to work. My example above essentially does full text search against an indexed extended attribute.
Darren.