Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft search API not giving all the results #3476

Open
ustymend opened this issue Dec 2, 2024 · 0 comments
Open

Microsoft search API not giving all the results #3476

ustymend opened this issue Dec 2, 2024 · 0 comments
Labels

Comments

@ustymend
Copy link

ustymend commented Dec 2, 2024

Describe the bug
The Microsoft Search API is not returning all the results when quering sharepoint list when using "from" property for the request. Even though the "total" in the response is more than "from". When I do the same request again, I see the results just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://developer.microsoft.com/en-us/graph/graph-explorer

  2. Put "https://graph.microsoft.com/v1.0/search/query" as an endpoint

  3. Enter the request to search in the sharepoint list:
    "{
    "requests": [
    {
    "entityTypes": [
    "listItem"
    ],
    "query": {
    "queryString": "claims path:"Put Link to the sharepoint list here""
    },

     "from": 48,
     "sortProperties": [
       {
         "name": "Created",
         "isDescending": true
       }
     ],
     "fields": [
       "requestIDOWSTEXT",
       "ListitemID"
     ]
    

    }
    ]
    }"

  4. Click on "Run query"

  5. See the results are:
    "{
    "value": [
    {
    "searchTerms": [
    "claims"
    ],
    "hitsContainers": [
    {
    "total": 75,
    "moreResultsAvailable": true
    }
    ]
    }
    ],
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.searchResponse)"
    }"
    Sometimes it returns 2 or 3 items, but not all

  6. If you Click on "Run query" again (for bigger number of items you need to run again multiple times for query starting from 300 I need to run 5 times)

  7. The results are correct:
    "{
    "value": [
    {
    "searchTerms": [
    "claims"
    ],
    "hitsContainers": [
    {
    "hits": [All results from 48 to 75],
    "total": 75,
    "moreResultsAvailable": true
    }
    ]
    }
    ],
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.searchResponse)"
    }"

Expected behavior
The results outlined in step 7 all the time

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser Microsoft Edge
  • Version 131.0.2903.70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant