can you run toString() on the ViewQuery before passing it in to the query() method and comparing it to the request you perform directly over http? See if there are any differences?
@firas if your data is updating all the time, it is kind of expected that java is returning different results all the time?
One thing that is not clear to me is the exact issue you are having. Let me rephrase that: while data is being mutated, you are issuing N queries over http direct in 1 second intervals and they don’t change, while when you issue N sdk queries in 1 second intervals and they do change?
That would be surprising to me, since as you probably know, the SDK also just executed http calls in the background, so it would come down to the same queries. Can you share more information about the exact test case and scenario you are performing?
I just updating all the time the same ID’s by maybe another values or the same and expiry time (2 hours).
Data size ( ~1 milion documents) ID looks like this blabla,blabla2,blabla3 .
I emit 2 informations emit([blabla1,blabla2],doc) emit([blabla1,blabla2,blabla3],doc).
When I updating all time time this documents my view is updating so I ask about stale “TRUE/OK” because I want fast response.
I ask about some “key” by REST I geting full response (that what I expect) but when I ask in SDK result is different, sometimes had 10 documents or 150 documents. I never get expected result.
I think problem is I updating that documents all the time but why REST response is other?
Okay, so first your custom environment doesn’t make much sense, just use the default one.
Next, do not close the bucket until you finished all your stuff
Finally, the code as it stands here will trigger a key=["KEY, “KEY2”] I don’t think thats what you want unless the key you emit in a view is like emit(["KEY, “KEY2”,null); and NOT two separate emits.
Are you sure that you actually don’t want “keys” instead of key? if you use keys, then rows with either “KEY” or “KEY2” will be returned.