Retrieve documents from an indexAsk AIpost https://api.ducky.ai/v1/documents/retrieveRetrieve documents from an index using a query, top_k, and other parametersBody Paramsindex_namestringrequiredThe name of the index to retrieve documents fromquerystringrequiredThe search query used for retrieving documentstop_kintegerrequired1 to 2048The number of documents to retrievealphanumber0 to 1Between 0 and 1, configures balance between keyword and semantic retrievalrerankbooleanWhether to rerank the results after retrievalmetadata_filterobjectThe filter object is used to specify query criteria for filtering results. Each key in the filter object represents a field name, and its value is a dictionary of comparison operators. Logical operators can be used within these dictionaries to combine multiple conditions. Comparison Operators: $eq: Checks if a field is equal to a specified value (string, number, or boolean). Simplified form: "field1": "value1" is equivalent to "field1": {"$eq": "value1"}. $ne: Checks if a field is not equal to a specified value (string, number, or boolean). $gt: Checks if a field is greater than a specified numeric value. $gte: Checks if a field is greater than or equal to a specified numeric value. $lt: Checks if a field is less than a specified numeric value. $lte: Checks if a field is less than or equal to a specified numeric value. $in: Checks if a field's value is within a specified list of values (strings, numbers). $nin: Checks if a field's value is not within a specified list of values (strings, numbers). Logical Operators (used within field-specific dictionaries): $and: An array of filter objects, all of which must evaluate to true. $or: An array of filter objects, at least one of which must evaluate to true. Example: { "field1": "value1", // Simplified equals check "field2": {"$gt": 10}, "field3": { "$or": [ {"$in": ["value2", "value3"]}, {"$ne": "value4"} ] } }metadata_filter objectResponses 200Retrieved documents 400Invalid request (e.g., missing required fields) 404Index not foundUpdated 7 months ago