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

CDC #323 - Make 'name' string field sortable during typesense schema creation #109

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

blms
Copy link
Contributor

@blms blms commented Dec 5, 2024

In this PR

Per Atlas and performant-software/core-data-cloud#323, allow sorting on the name and name_facet fields.

Notes

  • This only applies during collection creation at the schema definition stage, so existing collections will need to be recreated or manually modified.
  • Consuming clients will need to specify the sort field and direction in order to take advantage of it.

@blms blms requested a review from dleadbetter December 5, 2024 21:34
@blms blms changed the title Make 'name' string field sortable during typesnse schema creation Make 'name' string field sortable during typesense schema creation Dec 5, 2024
@blms blms force-pushed the feature/sort-by-name branch from f64adf6 to 8fa7e11 Compare December 5, 2024 22:05
type: 'string',
sort: true
},{
name: 'name_facet',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to walk back my previous note, I don't think we'll need name_facet to be sortable.

Copy link
Contributor

@dleadbetter dleadbetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment about my incorrect directions 🙃 . I've also created #323, which can be linked to this PR. Also if you could label this PR with "next release".

@@ -34,6 +34,15 @@ def create
type: 'geopoint',
facet: false,
optional: true
}, {
name: 'name',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to make this optional. All records should have a name attribute, but in the event that one doesn't (due to an import error or something) we don't want to prevent the project from being indexed.

@blms blms added the v0.1.66 Issues in v0.1.66 label Dec 6, 2024
@blms
Copy link
Contributor Author

blms commented Dec 6, 2024

Tested locally and it works! My collection created from this task now has the options to sort on name:asc and name:desc.

@blms blms force-pushed the feature/sort-by-name branch from baf1344 to 80173b7 Compare December 6, 2024 17:40
@blms blms requested a review from dleadbetter December 6, 2024 17:40
Copy link
Contributor

@dleadbetter dleadbetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@blms blms merged commit 1a7d262 into master Dec 6, 2024
@blms blms deleted the feature/sort-by-name branch December 6, 2024 17:47
@dleadbetter dleadbetter changed the title Make 'name' string field sortable during typesense schema creation CDC #323 - Make 'name' string field sortable during typesense schema creation Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.1.66 Issues in v0.1.66
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants