MarkLogic Rest API: How to constraint the search based on the size of documents?

Viewed 24

Using Rest API in MarkLogic, I would like to set a constraint on the size of the documents that contain the search term. In my use case, there are lots of small files (Readme, release note, email, etc.) that pollute the search response. For example, how can I filter files smaller than 1MB out?

1 Answers

You’ll need to add metadata to the document concerning its size and use it in the query. If you just want small and large as simple categories you could use collections.

Related