Query by Id

Here we will show you how you can query a single or multiple documents by id.

<?php
use Comfortable\Filter;

$id = '981075884394024960';
$results = $api->getDocuments()
  ->filter(
    (new Filter)
      ->addAnd('id', 'equal', $id, 'meta')
    )
    ->execute();

Query by Ids

<?php
use Comfortable\Filter;

$ids = ['981075884394024960', '982513777712959488'];
$results = $api->getDocuments()
  ->filter(
    (new Filter)
      ->addAnd('id', 'in', $ids, 'meta')
    )
    ->execute();

Last updated