Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schema: Specify the encoding for character offsets #224

Merged
merged 2 commits into from
Dec 12, 2023
Merged

Conversation

varungandhi-src
Copy link
Contributor

This PR adds a new PositionEncoding field so that indexers can specify
what type of character offsets they are using. This way, consumers of SCIP
can unambiguously interpret the offsets for non-ASCII data.

I have kept it as a field on Document rather than Index because:

  1. There is no additional benefit from having it on Index because
    occurrences only belong inside Documents, not outside.
  2. It allows one to concatenate indexes from different sources
    which use different kinds of offsets.

Test plan

n/a

scip.proto Show resolved Hide resolved
@olafurpg
Copy link
Member

Good point about making this per document. Would make sense to support the same for the text document encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants