Similar species API call doesn't use 'current' parameter

(Stemming from discussion here.)

I don’t totally understand how the similar species endpoint works, but the API docs claim that you can use the parameter current to get different results based on whether an ID is the most recent ID by a user.

However, calling the API with current=true, current=false, and current=any always returns the same results. I have a suspicion that the issue stems from the refactoring of similar_species last fall.

Well the API docs no longer claim you can use current as a parameter, so I guess I’ll mark this solved. It would still be nice to be able to see similar species calculated using withdrawn IDs.

2 Likes

Yes the documentation was not up-to-date and I updated it yesterday. Unfortunately it is not possible to filter identifications used for similar_species by wether or not they are current - it only uses current IDs. We may have had the ability to do that a year or more ago, but when we migrated from Elasticsearch 5 to Elasticsearch 7 we rebuilt all of our search indices to be more efficient for the queries that were being used.

We nor anyone at the time (nor since for that matter until now) needed this capability and the indices were built to maximize query and indexing efficiency. Before the change the similar_species calls were taking 5 seconds on average - slow enough that the feature might have been removed - but after the change they now take about 500ms on average.

1 Like