Skip to content

Parse inverted indexes field names into array of strings #510

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CriggerMarg
Copy link

Right now IndexApiClient.GetAllCollectionIndexesAsync fails with deserealization issue.

It happens because for persistent indexes only field names are stored and returned as array of strings.
For inverted indexes it's different: there is an object with properties.

My goal was to fix deserealization issue to allow my work to continue as we want to use inverted indexes in our database and using mentioned method for database schema verify.

I do know there is InvertedIndexField model but don't think adding a major change to interface is what is needed for this issue.

@JLedel
Copy link
Contributor

JLedel commented Jul 17, 2025

The Go sdk have two properties for each index, which I kind of like:

// RegularIndex is the regular index object. It is empty for the InvertedIndex type.
RegularIndex *IndexOptions `json:"indexes"`

// InvertedIndex is the inverted index object. It is not empty only for InvertedIndex type.
InvertedIndex *InvertedIndexOptions `json:"invertedIndexes"`

The generic properties for the index is still on the "base" model.

The Java SDK have two different methods instead, either you get normal indexes or you get inverted ones. Maybe we should discuss the best way forward in #493?

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