Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SearchCenter XML

  Asked By: Colt    Date: Jul 10    Category: Sharepoint    Views: 1555

I can't figure out the right query for my Properties "property" within
search center.

I was able to get <Query>FileExtension='pdf'</Query> to work.

I'm trying to get <Query>FileExtension contains 'pdf'</Query> to work
and so I am trying several different syntax.


FileExtension is a valid property but is not a PropertyRef.

When I use the syntax below, I get the error: "Property doesn't exist or
is used in a manner inconsistent with schema settings."



<QueryText language="en-us" type='STRING'>




name='FileExtension' />








Do I need to use PropertyRef instead of FieldRef?

I try MSSQLFT syntax


I know the query works because I executed it in a 3rd party Search
Tester Tool.

When I put it in to context of SearchCenter properties I get the error:

Error while executing web part:
Microsoft.Office.Server.Search.WebControls.SrhdcGenericException: Your
search cannot be completed because of a service error. Try your search
again or contact your administrator for more information. --->
Microsoft.Office.Server.Search.Query.QueryMalformedException: Your query
is malformed. Please rephrase your query.

<ResultType DisplayName="PDFs" Name="currcatalog">



<QueryText language="en-us"

SELECT Title, Path, Description,
Write, Rank, Size FROM Scope() WHERE FileExtension = 'pdf'




<PropertyRef Name="Title" />


Yeah I realize I could just use scopes, but I'm trying to learn a new
skill, and the CAMeL is kicking my butt.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on SearchCenter XML Or get search suggestion and latest updates.