[Question] What is the proper mechanism for searching by version?
Asking on behalf of one of my teams:
Scenario: If we query the search service for a record with a version that does not exist, the version that does exist is returned back. Our expectation is that zero results should be returned back from that query. Please refer to the search request below:
{
“kind”: “opendes:wks:work-product-component--LogCurve:1.0.0",
“query”: “id:\“opendes:work-product-component--LogCurve:ABDCQF01-48731\“, version:1615825387766997”
}
However, if we query the search service with the nonexistent version as a separate query, no versions will be returned. This is the behavior we are expecting. Please see the below request as an example:
{
“kind”: “opendes:wks:work-product-component--LogCurve:1.0.0”,
“query”: “id:\“opendes:work-product-component--LogCurve:ABDCQF01-48731\“”,
“query”: “version:1615825387766997”
}
Questions: Which way is the correct way to query for a specific version number? If it’s the first option, is it expected that the existing version will always be returned regardless of what version is provided in the query?
Because the storage service seems to overwrite outdated versions, will the user only have knowledge about the most recent version at any given time?
When providing an id
value in a reference property, should we always reference the latest version with the :
suffix? A reference to a specific version doesn’t seem usable as that version may be overwritten in the future based on observed behavior in the overwritten version issue linked above.