Api clients
/
Ruby
/
V1
/
Methods
Jan. 22, 2021
Get Object Position | Ruby API Client V1 (Deprecated)
This version of the Ruby API client has been deprecated in favor of the latest version of the Ruby API client.
Required API Key: no ACL required
About this method
Retrieve the given object’s position in the given results set. Can be used to debug relevance.
getObjectPosition
may be used to debug the relevance of an objectID
in specific results
set. If the objectID
is found, the position of the object is returned.
Examples
Copy
1
$position = SearchIndex::getObjectPosition($results, 'a-unique-identifier');
Parameters
results
|
type: key/value mapping
Required
The results set of a search. |
objectId
|
type: string
Required
The |
class
|
type: class
Required
Only for Java and Scala: the type of the hits. |
Response
No response.