While updating a document with embedded arrays, I am getting DivergentArrayError. I am updating array elements of the document.
Can someone please help me by explaining what does this error mean. I am not able to find any relevant information anywhere :(.
Related
I am using semantic search in azs, api version is 21-04-30, analyers i have selected is engish microsoft while creating index.
When i am typing any question in query string with searchMode=all, i am getting nothing as a result, when i am typing searchMode=any, then it is giving me result but not accurate. Can anyone help me?
(https://i.stack.imgur.com/Lm2IC.png)
Please check this image
I am writing query in question form with all search mode, but not getting expected result. if i am removing query keywords such as what , it is giving me result but not while framing question. Please help.
I want to get particular object in array. My database structure is shown in below image
In this i am trying to get particular object like this
db.users.find({article:{$elemMatch:{articleid:"WMCA268937"}}})
but nothing is getting, someone please help.
I checked https://github.com/hyperledger/composer/issues/543 https://github.com/hyperledger/composer/issues/1640 and ORDER BY not working in named query but they did not resolve my problem completely.
I added a custom index field in couchdb to sort by data.transactionTimestamp but my app still got the "no index exists for sort field" error.. Anyone knows how can I fix this? I only have GET and POST methods allowed for couchdb. I copy pasted my http://my_public_id:30984/channel1/_index records below since I dont have enough points to post picture. Sorry for the inconvenience and thank so much!
{"total_rows":4,"indexes":[{"ddoc":null,"name":"_all_docs","type":"special","def":{"fields":[{"_id":"asc"}]}},{"ddoc":"_design/26aaccbebd3e25d7dd8c6b8d7bcc25f6891cbfad","name":"26aaccbebd3e25d7dd8c6b8d7bcc25f6891cbfad","type":"json","def":{"fields":[{"data.transactionTimestamp":"asc"}],"partial_filter_selector":{}}},{"ddoc":"_design/c6dfa94edfc6620749e92789507a2ca946b98424","name":"c6dfa94edfc6620749e92789507a2ca946b98424","type":"json","def":{"fields":[{"data.transactionTimestamp":"asc"}],"partial_filter_selector":{}}},{"ddoc":"_design/e1d4f1e1212b6e8c3d6adabf71228868de791714","name":"e1d4f1e1212b6e8c3d6adabf71228868de791714","type":"json","def":{"fields":[{"transactionTimestamp":"asc"}],"partial_filter_selector":{}}}]}
Updated: query file on hyperledger
I am currently trying to write a generic deletion method for embedded documents in MongoEngine. I thought it would be possible to access the document object that contains an embedded document and define the delete function based on the parent document.
The delete function could then possibly look like this:
def delete():
{parent_document}.update(pull__myField={self})
I'm not quite sure yet if this will really work the way I imagine it will but I think it's worth a try. The only thing I don't know yet is how to access the document in which the embedded document exists. So basically I have to somehow access the document referenced as parent_document in the code above from the embedded document.
Does anyone have any idea how to do this? Maybe it's a bad idea in general if someone thinks so, just let me know.
If you want to access to parent document, you can use self._instance in embedded document.
https://github.com/MongoEngine/mongoengine/issues/63
does anyone know how to use the SPListItemCollection ReorderItems method? I cannot seem to find sufficent documentation on this method. What I want to do is order the list in decending order by date. I am not sure what the required values are, http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemcollection.reorderitems.aspx, thanks for all the help.
the link you stated gives you all the information you need.
You can get more info from refactoring:
Microsoft.SharePoint.ApplicationPages.dll in the ReorderPage class' BtnSave_Click event.
Probably, the issue you are having has to do with the fact that the list in question needs the allow ordering set to true. google for this, or check this url if still working.