I am very new to using querypacket search queries, so please provide info useful to a complete beginner.

I have query like below. The issue is that the existing query will return me all documents that are of .txt or .docx file types but not .pdf file types.

I need to be able to search by file name or type, so if I am searching for a .txt file, then the line below will look like

<QueryText type="STRING" language="en-us">.txt ...

If I try to search for .docx, the same line will look like

<QueryText type="STRING" language="en-us">.docx...

And these both return me all documents of txt or docs types. But if I search for .pdf then the line looks like:

<QueryText type="STRING" language="en-us">.pdf....

and that fails to return any pdf file.

Say my pdf file was named "Some file I am interested in.pdf". My search query should return that file if I search by "Some" or "file" or "interested" or ".pdf" or "pdf", etc.

Here is my query

<?xml version="1.0" encoding="utf-8" ?>
<QueryPacket Revision="1000">
    <Query domain="QDomain">
            <QueryText type="STRING" language="en-us">.pdf (Path:"http://my-sp2010/sites/ME/LOC" IsDocument:"true" (ContentClass:"STS_ListItem_DocumentLibrary" OR ContentClass:"STS_ListItem_1302" OR ContentTypeId:"0x0101*") NOT(FileExtension:"aspx"))</QueryText>

1 Answer 1


Should be something like this

<QueryText language='en-US' type='STRING'>test filetype:pdf</QueryText>
  • but I do not want to query only for pdf files
    – pixel
    Nov 10, 2016 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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