Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have constructed a simple web application following the MSDN walk-through as a guide:

Here is the Code Behind:

Protected Sub btnQuery_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnQuery.Click
    Try
        Dim lcQueryServices As New QueryWebServiceProxy.QueryService()
        lcQueryServices.Credentials = System.Net.CredentialCache.DefaultCredentials
        'lblErrors.Text = GetXMLString().Replace("<", "&lt;").Replace(">", "&gt;") 'To Test that XML String is rendered correctly
        Dim lcQueryResults As System.Data.DataSet = lcQueryServices.QueryEx(GetXMLString())
        grdResults.DataSource = lcQueryResults.Tables("RelevantResults")
    Catch ex As Exception
        lblErrors.Text = ex.ToString()
    End Try
End Sub

Private Function GetXMLString() As String
    Dim lsQueryXML As XElement = <QueryPacket xmlns='urn:Microsoft.Search.Query'>
                                     <Query>
                                         <SupportedFormats>
                                             <Format revision='1'>urn:Microsoft.Search.Response.Document:Document</Format>
                                         </SupportedFormats>
                                         <Context>
                                             <QueryText language='en' type='FQL'>
                                                 <%= GetFQLString() %>
                                             </QueryText>
                                         </Context>
                                         <ResultProvider>FASTSearch</ResultProvider>
                                         <Range>
                                             <Count>10</Count>
                                         </Range>
                                     </Query>
                                 </QueryPacket>
    Return lsQueryXML.ToString()
End Function

Private Function GetFQLString() As String
    Dim lsFQLString As StringBuilder = New StringBuilder("string(""")
    'lsFQLString.Append(txtQuery.Text)
    lsFQLString.Append("test"", mode=""and"")")
    Return lsFQLString.ToString()
End Function

I am receiving the following error when attempting to query the web service:

System.Web.Services.Protocols.SoapException: Property doesn't exist or is used in a manner inconsistent with schema settings. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at FQLTest1.QueryWebServiceProxy.QueryService.QueryEx(String queryXml) in C:\Users\nealcb\Documents\Visual Studio 2010\Projects\Web Projects\FQLTest1\FQLTest1\Web References\QueryWebServiceProxy\Reference.vb:line 143 at FQLTest1._Default.btnQuery_Click(Object sender, EventArgs e) in C:\Users\nealcb\Documents\Visual Studio 2010\Projects\Web Projects\FQLTest1\FQLTest1\Default.aspx.vb:line 15

Any recommendations?

Update 1.0 3/11/2011

I was able to move my testing to Powershell where I am able to make rapid changes to the query to see if I get any errors. Here is what I found in the logs:

03/11/2011 15:27:51.88 w3wp.exe (0x126C) 0x1274 SharePoint Server Search Query g4hl Medium FastSearchGateway::GetQueryResult--Unrecognized Field Exception searching on QRServer: http://FastQuryServer:13287 -- Exception: Microsoft.SharePoint.Search.Extended.Query.Query.UnrecognizedFieldException: Field Write not found in search results. at Microsoft.SharePoint.Search.Extended.Query.Result.TextResultParser.ReadDocument(TextReader reader) at Microsoft.SharePoint.Search.Extended.Query.Result.TextResultParser.ParseInternal(TextReader reader) at Microsoft.SharePoint.Search.Extended.Query.Result.TextResultParser.Parse(Stream result) at Microsoft.SharePoint.Search.Extended.Query.Http.AbstractUrlBasedSearchEngine.SearchInternal(IQuery query, IResultParser parser, String urlStr) at Microsoft.SharePoint.Search.Extended.Query.Http.AbstractUrlBasedSearc... 6281e480-7d74-4026-87ca-f6a0b93983f9 03/11/2011 15:27:51.88* w3wp.exe (0x126C) 0x1274 SharePoint Server Search Query g4hl Medium ...hEngine.Search(IQuery query) at Microsoft.Office.Server.Search.Query.Gateway.FastSearchGateway.GetQueryResult(IQuery query) 6281e480-7d74-4026-87ca-f6a0b93983f9 03/11/2011 15:27:51.88 w3wp.exe (0x126C) 0x1274 SharePoint Server Search Query g4hk Monitorable AbstractSearchGateway::Search--Exception when searching for string("buchan", mode="and"). Ex: Write 6281e480-7d74-4026-87ca-f6a0b93983f9 03/11/2011 15:27:51.88 w3wp.exe (0x126C) 0x1274 SharePoint Server Search Query g4i1 Monitorable FASTQueryInternal::Execute--Invalid Property Exception when trying to search FAST backend: Write 6281e480-7d74-4026-87ca-f6a0b93983f9 03/11/2011 15:27:51.88 w3wp.exe (0x126C) 0x1274 SharePoint Server Search Query dk68 High SearchServiceApplication::Execute--Exception: Write 6281e480-7d74-4026-87ca-f6a0b93983f9 0

Update 1.1 - Below is my Powershell Script I am using to test this. In speaking with the team, we are leaning towards the property being a duplicate in the managed metadata service (I think). I have verified that the FQL I am transacting is valid. I have decided to run the same script (below) against my dev sharepoint server running on a VM. I just need to get Search enabled first.

$pass = ConvertTo-SecureString "***" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential -ArgumentList "***", $pass
$web = New-WebServiceProxy "http://SearchWebService" -Credential $creds 
$lsQueryXML  = "<QueryPacket xmlns='urn:Microsoft.Search.Query'><Query><SupportedFormats><Format revision='1'>urn:Microsoft.Search.Response.Document:Document</Format></SupportedFormats><Context><QueryText language='en' type='FQL'>string(`"buchan`", mode=`"and`")</QueryText></Context><Properties><Property Name=`"WorkId`"/><Property Name=`"Rank`"/><Property Name=`"Title`"/><Property Name=`"Author`"/><Property Name=`"Path`"/><Property Name=`"Description`"/><Property Name=`"SiteName`"/><Property Name=`"CollapsingStatus`"/><Property Name=`"HitHighlightedSummary`"/><Property Name=`"HitHighlightedProperties`"/><Property Name=`"ContentClass`"/><Property Name=`"IsDocument`"/><Property Name=`"PictureThumbnailURL`"/><Property Name=`"Url`"/><Property Name=`"ServerRedirectedUrl`"/><Property Name=`"SpSiteUrl`"/><Property Name=`"docvector`"/><Property Name=`"fcocount`"/><Property Name=`"fcoid`"/><Property Name=`"PictureHeight`"/><Property Name=`"PictureWidth`"/></Properties><ResultProvider>FASTSearch</ResultProvider><Range><Count>10</Count></Range></Query></QueryPacket>"
$lcQueryResults = $web.QueryEx($lsQueryXML)
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I think you are searching for a Managed Property that doesn't exist in FAST. That's what the "Property doesn't exist or is used in a manner inconsistent with schema settings" and "Unrecognized Field Exception searching on QRServer" messages seem to indicate.

Follow the steps on my blog to debug directly on the QR server. If you can't get an FQL query to work there, it isn't going to work on via powershell/c#. The QR server is a FAST interface accessible only while RDP'ed onto the FAST server, typically accessible via http://localhost:13280 (baseport + 280).

Consider using the MOSSMan FAST Query Tool to help create the correct XML for your query.

share|improve this answer
    
Referencing your blog post, I am confident that my XML is adequate. Looking through the logs, I have determined that the write field is apparently at fault. I am trying to delete it, but it is proving stubborn. –  websch01ar Mar 14 '11 at 15:53
    
The Write field refers to the Modified Date so I doubt you want to delete it. Coming back to the XML, if you paste it into the MOSSMan tool, does it return a result? What you might need to do is create and deploy a new Write field (in case yours somehow got deleted) or if it exists, make it queryable. –  Neil Richards Mar 14 '11 at 16:59
    
"Field Write not found in search results." seems to indicate the field is not queryable. –  Neil Richards Mar 14 '11 at 17:00
    
Neil, Would I use the search.asmx page for the Site URL in MossMan's FAST for SharePoint Query Tool? –  websch01ar Mar 14 '11 at 20:20
    
I usually just point it at my search site (i.e. http://<myserver>/search –  Neil Richards Mar 15 '11 at 10:04
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.