1

I have a CAML Query that brings 53 results. When I add the range below I get 13 results instead of 10.

<Range>
    <StartAt>41</StartAt>
    <Count>10</Count>
</Range>
  • StartAt=1 and Count=10 brings 10 results
  • StartAt=11 and Count=10 brings 10 results
  • StartAt=21 and Count=10 brings 10 results
  • StartAt=31 and Count=10 brings 10 results
  • StartAt=41 and Count=10 brings 13 results

Any idea why I am getting 13 results instead of 5?

Here is the complete CAML Query:

<QueryPacket xmlns='urn:Microsoft.Search.Query'>
<Query>
    <Context>
        <QueryText language="en-US" >ContentType:CustomDoc</QueryText>
    </Context>
    <SupportedFormats Format="urn:Microsoft.Search.Response.Document.Document" />
    <ResultProvider>SharePointSearch</ResultProvider>
    <Range>
        <StartAt>41</StartAt>
        <Count>10</Count>
    </Range>
    <EnableStemming>true</EnableStemming>
    <EnableSpellCheck>Suggest</EnableSpellCheck>
    <IncludeSpecialTermsResults>true</IncludeSpecialTermsResults>
    <IncludeRelevantResults>true</IncludeRelevantResults>
    <ImplicitAndBehavior>true</ImplicitAndBehavior>
    <TrimDuplicates>false</TrimDuplicates>
    <Properties>
        <Property name="Rank" />        
        <Property name="Title" />       
        <Property name="Size" />        
        <Property name="Path" />        
        <Property name="Description" /> 
        <Property name="Write" />       
        <Property name="propertyNumber" />
        <Property name="propertyId" />
        <Property name="propertyTitle" />
        <Property name="propertyShortTitle" />
    </Properties>
    <SortByProperties>
        <SortByProperty name="propertyShortTitle" direction="Ascending" />
    </SortByProperties>
    <IncludeRefinementResults>
        <Refiners>              
            <Refiner>refiner1</Refiner>
            <Refiner>refiner2</Refiner>
            <Refiner>refiner3</Refiner>
            <Refiner>refiner4(filter=101)</Refiner>
            <Refiner>refiner5</Refiner>
            <Refiner>refiner6</Refiner>
        </Refiners>
        <MaxShallowRefinementHits>2000</MaxShallowRefinementHits>
    </IncludeRefinementResults>     
</Query>

UPDATE:

  • StartAt=41 and Count=6 brings 6 results
  • StartAt=41 and Count=7 brings 13 results ?????
  • We will need more to go on. Can you sanitize and share the XML for the whole list or library or whatever this is? Can you share the results for the above queries? Can you share your complete CAML query? – ghangas Oct 20 '17 at 19:22
  • I have updated the question with the query. Thanks! – Aslan Oct 25 '17 at 19:45
  • What if you dont specify count? how many results you get. – SharePointMan Nov 2 '17 at 13:39
  • I get 13 results, starting at 41. – Aslan Nov 2 '17 at 14:09
0

I would suggest you to try few things (one by one) to see if it works

  1. Dont specify the count parameter. By default, it anyways gives 10 results
  2. Set <TrimDuplicates>true</TrimDuplicates>
  3. set <IncludeSpecialTermsResults>false</IncludeSpecialTermsResults>
  • can you share the results if possible? – SharePointMan Nov 6 '17 at 7:40
  • Unfortunately I can not share the results. I do not think it it related to the results... I believe this is a SharePoint bug... – Aslan Nov 6 '17 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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