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

Add @orama/plugin-pt15 #817

Merged
merged 9 commits into from
Oct 14, 2024
Merged

Add @orama/plugin-pt15 #817

merged 9 commits into from
Oct 14, 2024

Conversation

allevo
Copy link
Collaborator

@allevo allevo commented Oct 11, 2024

Implement different index algorithm.

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orama-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 14, 2024 11:13am

Copy link
Member

@micheleriva micheleriva left a comment

Choose a reason for hiding this comment

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

minor comments, but lgtm!


type InternalDocumentID = internalDocumentIDStore.InternalDocumentID;

export type TreeType = 'AVL' | 'Radix' | 'Bool' | 'Flat' | 'BKD';
Copy link
Member

Choose a reason for hiding this comment

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

We should export these from the @orama/orama package

type InternalDocumentID = internalDocumentIDStore.InternalDocumentID;

export type TreeType = 'AVL' | 'Radix' | 'Bool' | 'Flat' | 'BKD';
export type TTree<T = TreeType, N = unknown> = {
Copy link
Member

Choose a reason for hiding this comment

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

This one too

node: N;
isArray: boolean;
};
export type Tree =
Copy link
Member

Choose a reason for hiding this comment

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

This one too

packages/plugin-pt15/src/algorithm.ts Show resolved Hide resolved
vectors: {}
}
} else {
const isArray = /\[/.test(type as string)
Copy link
Member

Choose a reason for hiding this comment

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

we may want to use .endsWith("[]") or even type[type.length-1] == ']' for performance reasons

positionsStorage: PositionsStorage,
prop: string,
internalId: InternalDocumentID,
language: string | undefined,
Copy link
Member

Choose a reason for hiding this comment

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

I think I started exposing a Optional type which is basically type Optional<T = unknown> = T | undefined

@micheleriva micheleriva merged commit 328b1db into feat/orama-3.0 Oct 14, 2024
3 checks passed
@micheleriva micheleriva deleted the feat/plugin-pt15 branch October 14, 2024 12:55
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