marklogic-community / marklogic-nifi-incubator

A collaboration space for processors, recipes, templates, etc. NOTE: improvements made to the connector in this project have been incorporated into the MarkLogic NiFi repository (https://github.com/marklogic/nifi).
Apache License 2.0
4 stars 11 forks source link

QueryMarkLogic Processor returns less than expected number of results #83

Closed millerbill3 closed 4 years ago

millerbill3 commented 4 years ago

A user has reported that the QueryMarkLogic Process always returns one less result than the same query run in QConsole. The same user is being used in NiFi and in QConsole and affects multiple queries.

User's Example:

After testing further, I noticed the issue only happens when QueryMarkLogic processor is in the middle of the flow. And the missing record is always the one at the last array/index. For example, if the query is like the one below, it returns the first and second and drops the last. I guess they need to look at their logic to capture the last index.

{
  "query": {
    "queries": [{
      "document-query": {
        "uri": [
            "/pdf/TR/AD1013325.pdf",
            "/pdf/TR/AD0000001.pdf",
            "/pdf/TR/AD0098986.pdf"
            ]
      }
    }]
}}