import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const documents = await client.search.documents({ query: 'x' });console.log(documents);
Search documents by filename using full-text search.
request.filters accepts the same operator set as /retrieve/chunks: $eq, $ne, $gt, $gte, $lt,
$lte, $in, $nin, $exists, $type, $regex (with optional i flag), $contains, and the logical
operators $and, $or, $nor, $not. Comparison clauses honor typed metadata (number, decimal,
datetime, date).
POST
/
search
/
documents
JavaScript
import Morphik from 'morphik';const client = new Morphik({ apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted});const documents = await client.search.documents({ query: 'x' });console.log(documents);