Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

customizing SPS Search

Status
Not open for further replies.

bereza

Technical User
Jun 14, 2006
105
EU
Hi,


I am trying customize SPS search that you can get all documents that have a specific custom property.

everything almost goes well, but the problem is if there are many documents that have same property it returns just the first one. why?

here is a bit of my code:

try
{
PortalContext context = PortalApplication.GetContext(Context);

SPSite IgnitoSiteCollection = SPControl.GetContextSite(Context);

string query = "SELECT \"DAV:href\",\"DAV:displayname\"," +
"\"urn:schemas-microsoft-com:eek:ffice:eek:ffice#Author\"" +
"FROM ( TABLE Portal_Content..Scope() " +
"UNION ALL TABLE Non_Portal_Content..Scope() ) " +
"WHERE (\"urn:schemas.microsoft.com:sharepoint:portal:isdocument\" = 1)" +
"AND \"urn:schemas-microsoft-com:eek:ffice:eek:ffice#MyProp\" = '" + textbox1.Text + "'";

QueryProvider QProvider = new QueryProvider(context.SearchApplicationName);

DataSet DS = QProvider.Execute(query);

}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top