[Python] pyvespa: what is efficient efficient way to retrieve all document ids

Discussão em 'Python' iniciado por Stack, Maio 2, 2025.

  1. Stack

    Stack Membro Participativo

    I am using private Vespa server.

    Given a schema with large number of documents, what is the best way to retrieve all document IDs?

    A query to match the relevant docs would be something like:

    "select id from my_container where my_field contains \"my_value\";"


    Indexing for the relevant field is enabled.

    The output size is limited by maxHits value which configured on server side.

    One also can use visit method with selection=my_container.my_field==\"my_value\".

    This works, but slow. In my case, sometimes, only small fraction of documents match search criteria and using visit seems to be inefficient.

    Continue reading...

Compartilhe esta Página