1

I want to get all content authors for the search query results. I'm using following query:

<QueryPacket xmlns="urn:Microsoft.Search.Query">
  <Query>
      <SupportedFormats>
        <Format>urn:Microsoft.Search.Response.Document.Document</Format>
      </SupportedFormats>
    <Context>
       <QueryText type="FQL">forsiden</QueryText>
    </Context>
    <Properties>
      <Property name="Author" />
    </Properties>
    <TrimDuplicates onproperty="Author">true</TrimDuplicates>
  </Query>
 </QueryPacket>

But search results still contain duplicate values for Author property. Query is valid according to schema and TrimDuplicates part. What am I doing wrong?

EDIT

According to Mikael Svenson I'm trying to use such query:

<QueryPacket xmlns="urn:Microsoft.Search.Query">
  <Query>
    <SupportedFormats>
      <Format>urn:Microsoft.Search.Response.Document.Document</Format>
    </SupportedFormats>
    <Context>
      <QueryText type="FQL">us</QueryText>
    </Context>
    <Properties>
      <Property name="Author" />
    </Properties>
    <EnableStemming>true</EnableStemming>
    <EnableSpellCheck>false</EnableSpellCheck>
    <IncludeRelevantResults>false</IncludeRelevantResults>
    <Range>
      <Count>20</Count>
    </Range>
    <IncludeRefinementResults>
      <Refiners>
        <Refiner>author</Refiner>
      </Refiners>
    </IncludeRefinementResults>
  </Query>
</QueryPacket>

But resulting data set has no tables at all. I cant set ResultProvider to FASTSearch because when I do so, it throws exception:

The search request was unable to connect to the Search Service.

Maybe refiners cant be used with search server? But in features it is listed.

2 Answers 2

1

According to the schema documentation:

Query.TrimDuplicates.onproperty: Specifies the name of a managed property to use for duplicate result removal. The managed property MUST be of type integer.

1
  • So its not possible to get distinct authors?
    – Sly
    Commented May 19, 2011 at 6:27
1

It's quite easy. You have to think a bit different about the problem. In a user interface refiners give you distinct values with count, so get the refiners for Authors instead. No need for trimming.

The following query was created using the query tool at http://fastforsharepoint.codeplex.com/.

<QueryPacket Revision="1000">
  <Query>
    <Context>
      <QueryText language="en-US" type="FQL">forsiden</QueryText>
    </Context>
    <SupportedFormats Format="urn:Microsoft.Search.Response.Document.Document" />
    <ResultProvider>FASTSearch</ResultProvider>
    <Range>
      <StartAt>1</StartAt>
      <Count>0</Count>
    </Range>
    <EnableStemming>true</EnableStemming>
    <EnableSpellCheck>Off</EnableSpellCheck>
    <IncludeSpecialTermsResults>false</IncludeSpecialTermsResults>
    <IncludeRelevantResults>false</IncludeRelevantResults>
    <ImplicitAndBehavior>true</ImplicitAndBehavior>
    <IncludeRefinementResults>
      <Refiners>
        <Refiner>author</Refiner>
      </Refiners>
    </IncludeRefinementResults>
  </Query>
</QueryPacket>
4
  • For the search server 2010 RefinementResults table is not present in resulting dataset. Does Refiners can be applied to it?
    – Sly
    Commented May 19, 2011 at 7:51
  • 1
    I assumed you were using FAST for SharePoint as you tagged your question with "fast". So, it's search server you are using? Then you have to modify the query, as "FQL" is not supported by search server. Commented May 20, 2011 at 8:50
  • Yes, I'm using search server. Which language is supported by it? only STRING? And still the same question, does it supports refiners?
    – Sly
    Commented May 20, 2011 at 10:46
  • I suggest you download the tool and try it out. It works for SharePoint stand-alone as well, so most likely also search server. I don't have search server at hand, but give it a try and let me know how it goes. And refiners should be supported. Commented May 20, 2011 at 19:32

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.