SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to use following codes, but it does not work. Results is

Total count =null. 

If I use "88x211", I can get the right result. How to write queryXml to search out "88X211.doc" using keyword "211"?

String query_select_xml="<QueryPacket xmlns='urn:Microsoft.Search.Query' Revision='1000'><Query>"+"<Range><Count>50</Count></Range>"+"<Context>"+
            "<QueryText language='en-US' type='MSSQLFT'>"+
            "SELECT filename,Title, Path, Description, Write, Rank, Size,author,hitHighlightedSummary,hitHighlightedProperties,contentclass FROM Scope()";
    query_select_xml+=" WHERE \"Scope\" = '"+Scope.toString();
    //query_select_xml+="' AND FREETEXT(contents,'"+Keyword.toString()+"')";
    query_select_xml+="' And (\"Filename\" like '211%') ";
    //query_select_xml+="' AND FreeText(filename,'211*')";
    query_select_xml+="ORDER BY \"Rank\" Desc "+"</QueryText>"+"</Context>" +
            "<IncludeHighConfidenceResults>true</IncludeHighConfidenceResults>" +
share|improve this question

I have found the solution. Setting the "Reduce storage requirements for text properties by using a hash for comparison" option in the settings of the managed property makes the LIKE predicate work.

share|improve this answer

Your Answer


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.