Skip to content

Question: Pagination #195

@VelinGeorgiev

Description

@VelinGeorgiev

Is it possible to do a pagination?

I tried the following

 SELECT
           *
        FROM %s
        WHERE embedding MATCH vec_quantize_binary(%s)
        AND k = %d
        LIMIT %d OFFSET %d

but got an error

Only LIMIT or 'k =?' can be provided, not both

I am planning to implement something like this:

SELECT
           *
        FROM %s
        WHERE embedding MATCH vec_quantize_binary(%s)
        ORDER BY distance
        LIMIT %d OFFSET %d

but wonder. Is there a better way to do it?

Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions