Plumtree EDK (Enterprise Web Development Kit) 5.4.0

ISearchFactory Interface

Factory interface to generate IPortalSearchRequest and IFilterClause.

The example below shows how to query using and AND filter clause and an OR filter clause.

Finds all documents that have been created in the last three months AND those documents whose name contains ".doc" OR ".ppt"
IFilterClause andFilterClause = searchFactory.CreateAndFilterClause();
//add a statement for created in the last three months
DateTime dt = DateTime.Now.AddMonths(-3);
andFilterClause.AddStatement(PlumtreeField.CREATED, Operator.GreaterThan, dt);
 
//make an or filter clause to say we want ppt files or doc files
IFilterClause orFilterClause = searchFactory.CreateOrFilterClause();
orFilterClause.AddStatement(PlumtreeField.NAME, Operator.Contains, ".ppt");
orFilterClause.AddStatement(PlumtreeField.NAME, Operator.Contains, ".doc");
andFilterClause.AddClause(orFilterClause);
 
searchRequest.SetQuery(andFilterClause);
//note that SetQuery also has an override to take a query and a filter clause.

For a list of all members of this type, see ISearchFactory Members.

public interface ISearchFactory

Requirements

Namespace: Plumtree.Remote.PRC.Search

Assembly: edk (in edk.dll)

See Also

ISearchFactory Members | Plumtree.Remote.PRC.Search Namespace