FIWARE / context.Orion-LD

Context Broker and CEF building block for context data management which supports both the NGSI-LD and the NGSI-v2 APIs
https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.06.01_60/gs_CIM009v010601p.pdf
GNU Affero General Public License v3.0
50 stars 41 forks source link

options = count returns a string in the header "ngsild-results-count". #1323

Closed FR-ADDIX closed 1 year ago

FR-ADDIX commented 1 year ago

Is it a bug or is it intentional that the header "ngsild-results-count" is now a string? This way the comparison of how many records are still to be queried works, of course only if the header "ngsild-results-count" is converted into an interger before the comparison with the OffSet. This was better solved with NGSI V2 and the header "Fiware-Total-Count" was there a number.

This is not tragic now, but a bit unusual solved. One actually expects a number for a count, right?

kzangeli commented 1 year ago

Not sure what you mean ... NGSILD-Results-Count is an HTTP header, in this format:

NGSILD-Results-Count: 20

You call it a string ... Sure, it's rest, everything is ASCII. But, this worked the exact same way in NGSIv2, so, something is off here. Make me understand the problem, cause, I'm drawing a blank here :)

FR-ADDIX commented 1 year ago

Ahgrr, I withdraw the question. It is a problem of Node-RED in the different versions. The "Switch Node" did the type conversion in the old version but not in the new one.

ngsild-results-count: "2072"

fiware-total-count: "9785"

sorry!

kzangeli commented 1 year ago

ok, that explains it ! :) No problem