Inconsistent search results


#1

Hey there, I’ve been hitting some odd search results, usually with ordering but sometimes just empty nodes as well. Here’s my query:

query SearchTop5Users($queryString: String!) {
  search(query: $queryString, type: USER, first: 5) {
    userCount
    edges {
      node {
        ... on User {
          id
          followers {
            totalCount
          }
          createdAt
        }
      }
    }
  }
}

Then the following works as expected:
{ "queryString": "created:<2008-01-01 sort:followers-desc"}
^ 3 users, ordered by followers descending
{ "queryString": "created:<2008-01-01 sort:followers-desc"}
^ Same 3 users sorted by followers ascending

Then it gets weird :wink:
{ "queryString": "created:<2009-01-01 sort:followers-asc"}
^ 41199 users, get 5, but all node's are empty?

{
  "data": {
    "search": {
      "userCount": 41199,
      "edges": [
        {
          "node": {}
        },

And with descending order on followers but all users is borked as the top one is 99, pretty sure there are users with more.
{ "queryString": "created:>2007-01-01 sort:followers-desc"}

{
  "data": {
    "search": {
      "userCount": 22181355,
      "edges": [
        {
          "node": {
            "id": "MDQ6VXNlcjcyOTUyNTI=",
            "followers": {
              "totalCount": 99
            },
            "createdAt": "2014-04-14T21:19:12Z"
          }
        },
        {
          "node": {
            "id": "MDQ6VXNlcjE3MTk5MTk2",
            "followers": {
              "totalCount": 97
            },
            "createdAt": "2016-02-12T14:12:23Z"
          }
        },
        {
          "node": {
            "id": "MDQ6VXNlcjUyODA5MDc=",
            "followers": {
              "totalCount": 96
            },
            "createdAt": "2013-08-21T18:42:02Z"
          }
        },
        {
          "node": {
            "id": "MDQ6VXNlcjE5MzYyMzY5",
            "followers": {
              "totalCount": 79
            },
            "createdAt": "2016-05-14T14:47:10Z"
          }
        },
        {
          "node": {
            "id": "MDQ6VXNlcjE2NzYxNDk=",
            "followers": {
              "totalCount": 70
            },
            "createdAt": "2012-04-24T20:58:17Z"
          }
        }
      ]
    }
  }
}

My uneducated guess is that it’s something to do with the search engine (ElasticSearch?) rather than the API itself. Any ideas?