orientechnologies / orientechnologies/orientdb

OIndex#get is marked as deprecated, what should be used to load ORecordId instead

Open
#9,744 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Java
Stars
5k
Forks
868
Avg merge
15h 6m
Merged PRs (30d)
18

Description

OrientDB Version: 3.1.14
Java Version: jdk 1.8._211
OS: Win10

OIndex.get is now marked as deprecated Java doc suggest to use {@link OIndexInternal#getRids(Object)} instead but only as internal (not public) API.
I don't find anything documented about it, just method deprecated (looking OIndexRemoteOneValue)
image

I'm using ODatabaseSession after remote connection. What method I should use to load ORecordId using index?

ORecordId idEntity = (ORecordId) oIndex.get("value-on-indexed-field");

What is the correct methods for performing this task on index?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with OIndex#get and the deprecation guidance for OIndexInternal#getRids(Object), then compare the public APIs exposed by OIndexRemoteOneValue for an ODatabaseSession after a remote connection. Check how the indexed value is expected to produce an ORecordId and document the supported replacement, including an example and relevant API references.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, databases
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.