formkiq / formkiq-core

A full-featured Document Layer for your application, providing the functionality of a flexible document management system, including storage, discovery, processing, and retrieval. Deploys directly into your Amazon Web Services Cloud. 🌟 Star to support our work!
https://www.formkiq.com
Other
112 stars 17 forks source link

Search by documentIDs (currently only a filter) #266

Closed reganwolfrom closed 2 months ago

reganwolfrom commented 3 months ago

Currently, there is no way to search (POST /search) using only the documentIDs in the query, as this was originally intended as a feature for other queries.

Example:

{
  "query": {
    "documentIds": [
      "{ID}"
    ]
  },
  "responseFields": {    
    "attributes": [      
      "meta1",
      "meta2",
      "meta3"
    ]
  }
}

This is considered an invalid body.

Current workaround is to use an expected attribute as a key-only query:

{
  "query": {
    "documentIds": [
      "{ID}"
    ],
    "attribute": {
      "key": "meta1"  
    }
  },
  "responseFields": {    
    "attributes": [      
      "meta1",
      "meta2",
      "meta3"
    ]
  }
}

Ideally, we would enable a search by document ID(s) alone.