Skip to content

Create the PageVectorIndexedMixin class#41

Draft
mgax wants to merge 1 commit into
wagtail:mainfrom
mgax:page-vector-indexed-mixin
Draft

Create the PageVectorIndexedMixin class#41
mgax wants to merge 1 commit into
wagtail:mainfrom
mgax:page-vector-indexed-mixin

Conversation

@mgax
Copy link
Copy Markdown
Member

@mgax mgax commented Jan 25, 2024

It's an explicit way to include Wagtail-specific behaviour (i.e. use of PageVectorIndex instead of ModelVectorIndex) when defining a Page model. This also helps with type annotations for the return value of the get_vector_index() method.

It's an explicit way to include Wagtail-specific behaviour (i.e. use of
`PageVectorIndex` instead of `ModelVectorIndex`) when defining a Page
model. This also helps with type annotations for the return value of
the `get_vector_index()` method.
@mgax
Copy link
Copy Markdown
Member Author

mgax commented Jan 25, 2024

I have this WIP patch to wagtail-vector-index lying around my repo since two weeks ago. It's a bit of a refactoring of the (page) model mixin class, to make typing easier, and make the code a bit more robust, but it introduces a breaking change. Not sure if it's worth pursuing, and I don't have bandwidth for it, so I've made it into a draft PR, in case somebody else finds it useful. If not, feel free to close it.

@tomusher tomusher mentioned this pull request Feb 26, 2024
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.

1 participant