5

On jobs let us say I am right here:

https://stackoverflow.com/jobs/companies?pg=1762

I see the following jobs:

enter image description here

I click on Square Panda Inc. right here:

https://stackoverflow.com/jobs/companies/square-panda-inc

At the top is a search results link as shown:

enter image description here

When I click this link I am taken back to my search results but with different companies from what I saw originally. Even though the parameter says pg=1762:

enter image description here

6
  • How is it supposed to be sorted? Is it sorted at all?
    – BSMP
    Aug 25, 2017 at 14:18
  • 1
    BSMP - I'm not sure but it is a bug because this only happens on certain pages? If im on page 2 of google search results and I click back to page 1 I am given what I initially had in page 1.
    – JonH
    Aug 25, 2017 at 14:19
  • For me, even refreshing the page a couple of times returns different companies.
    – George
    Aug 25, 2017 at 14:35
  • @George of course, going back to the page or simply reloading it both trigger a new search, they are basically the same thing.
    – luk2302
    Aug 25, 2017 at 20:16
  • 1
    This is the sort of thing for which you use "Open Link in New Tab". I almost always open search results from anywhere in new tabs. Doing so allows cycling down the list and sorting out the ones which look interesting, with the ability to switch back-and-forth to compare the resulting pages (whatever they are), all while maintaining the context of the search (or multiple searches, each in their own tab). This is the sort of thing for which tabs exist.
    – Makyen Mod
    Aug 26, 2017 at 4:00
  • Thats also true @Makyen good idea.
    – JonH
    Aug 26, 2017 at 4:14

1 Answer 1

2

We're sorting the hits from Elastic based upon the last activity date for jobs posted by the company. Once you get this far down the list of companies they pretty much all have the same sort key:

[
    {
        "_index": "careers-company-search-2017.08.25-13.26.28",
        "_type": "company-page",
        "_id": "22813",
        "_score": null,
        "sort": [
            -9223372036854776000
        ]
    },
    {
        "_index": "careers-company-search-2017.08.25-13.26.28",
        "_type": "company-page",
        "_id": "22949",
        "_score": null,
        "sort": [
            -9223372036854776000
        ]
    }
]

Elastic doesn't guarantee deterministic sort order in the face of identical keys because the query is sharded across multiple nodes and the order is dictated by the node that returns their results first.

We could start to use a cursor and the Elastic scrolling API but then our Elastic servers have to maintain a bunch of state. That hurts when you do it at scale.

We could add a secondary key to make this consistent but we have data to indicate that users rarely go past the first few pages of a search and certainly not out to page 1762. There's really no point making Elastic do additional work for something that is an unlikely event.

I'm afraid this is .

4
  • 4
    In other words, this is an issue when you get far on the long tail of results, which to a first approximation, no one does. Higher in the search results, there is a real signal to sort by, which is stable. Aug 25, 2017 at 14:55
  • 1
    Declined? This doesnt seem to be that difficult to implement. Try going to the fifteenth page same issue.
    – JonH
    Aug 25, 2017 at 15:38
  • 5
    The fix has a cost not only in terms of dev time but, more importantly, on our Elastic cluster. And it's literally for an edge case that few will ever hit - most users never go beyond the 3rd page of a list of results.
    – Dean Ward
    Aug 25, 2017 at 15:41
  • 1
    Is opening the |<< search results button in a new tab/window a possible workaround? Aug 26, 2017 at 3:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .