AnsweredAssumed Answered

SearchService.selectNodes(...) example

Question asked by eolith on Jul 20, 2009
Latest reply on Sep 25, 2013 by mrksjs
Hello,

I'm trying to find sample code using the "selectNodes" method from SearchService, but I haven't found anything at all.

I want to do a attribute-based search with the documents contained in a specified folder, and I think this method could be useful for this purpose.

The "selectNodes" method has 5 params:

NodeRef contextNodeRef - the context node for relative expressions etc
String xpath - the xpath string to evaluate
QueryParameterDefinition[] parameters - parameters to bind in to the xpath expression
NamespacePrefixResolver namespacePrefixResolver - prefix to namespace mappings
boolean followAllParentLinks - if false ".." follows only the primary parent links, if true it follows all

contextNodeRef -> my folder nodeRef, I guess… ??
xpath -> "/" for current space?
parameters -> search parameters? I don't know how to create "QueryParameterDefinition" objects…
namespacePrefixResolver -> ????
followAllParentLinks -> I don't know what it means…

Thanks for your help.

Outcomes