go to post Güvenal · Nov 11, 2021 Hello Robert!Thank you at least I find comfort in that you understand me and that I am not alone :-)I have marked your previous solution as the answer, since it works and is what I ended up using. Best regards, Magnus
go to post Güvenal · Nov 11, 2021 Hello Robert!ok I think I understand, thank you again for your time and code.So in my first attempt I actually saved the object in the databas as a %DynamicObject but I could not get the indexing to work.So saving as a %DynamicObject is not problem I am in control of how the information is saved.Lets say JSON contains "firstName" how would i create the index directly without computed properties on just that property $.firstName This below did not work and as far as I can tell it did not even understand that it was a object and just indexed the refrerence.Index AnalyticIdx On (JSON) As %iFind.Index.Analytic(INDEXOPTION = 0, LANGUAGE = "en", LOWER = 1); So I am still confused by this line below from the docs Specify $ to index the entire JSON object. Specify $.key2 to index the JSON values at key2 and below...ok but where should I specify $ or $.firstName, please answer if you know this. Best regards,Magnus
go to post Güvenal · Nov 11, 2021 Good morning all!Whaow thank you for your time and effort! You all gave me a great start of a new day I cannot still help to wonder about the few lines found in the documentation, how to you interpret these lines below."Indexing a JSON ObjectYou can create an iFind index for text stored in a JSON object. This index specifies the starting position in the JSON structure. iFind recursively indexes all text at that level and all nested levels below it. Specify $ to index the entire JSON object. Specify $.key2 to index the JSON values at key2 and below." Link to documentation So using my sample json I am thinking that it means that I can choose only to index firstName by creating the index and passing an argument like $.firstName something like Index AnalyticIdx On (JSON) As %iFind.Index.Analytic(KEY=$.firstName, INDEXOPTION = 0, LANGUAGE = "en", LOWER = 1); Best regards,Magnus
go to post Güvenal · Nov 11, 2021 Hello Timothy and thank you for your answer.With your suggested method do I have to "manually" update the index after every insert/update to the "table" by callingd ##class(DC.Demo.IndexJSON).Run() ?Best regards, Magnus
go to post Güvenal · Nov 10, 2021 Hello Robert!The JSON object can be a number of different objects with different properties.So I was thinking that the indexing logic would be smart enough to identify for example address in {"address":"Mystreet", "city":"MyCity"} and only index that column.Make sense?Best regards,Magnus
go to post Güvenal · Oct 22, 2019 Hello again Kevin!I cannot find a way to promote your "Comment" to an "Answer".But if you submit it as an answer I will be happy to accept it as the answer to my question Best regards,Magnus
go to post Güvenal · Oct 22, 2019 Hello Kevin!That was an excellent, elegant and simple solution to my problem.Thank you very much for your time and effort.Best regards,Magnus
go to post Güvenal · Nov 27, 2017 Hello Gertjan!I have been traveling the past week but my collegue used your solution successfully, thank you very much.If you add your solution as a new answer to this topic I will mark it as the correct solution for this question, that way it can help others in the future.Thanks you,Magnus
go to post Güvenal · Nov 21, 2017 Hello Marc!Thank you for your answer.Yes I have tried using properties and it is working fine but it is not what I need.Adding a property for example called Name will results in a XML like<urn:LogicalAddress xmlns="urn:registry:1" xmlns:hdr="urn:registry:1"><Name>Elmstreet 12</Name></urn:LogicalAddress>The SOAP.Adressing class will result in for example with you example with the MessageID, <SOAP-ENV:Header><wsa:MessageID>The value here</wsa:MessageID> </SOAP-ENV:Header>I need the tag to be <urn:LogicalAddress xmlns="urn:registry:1" xmlns:hdr="urn:registry:1">The value here</urn:LogicalAddress>So that is why I need a custom SOAP header. Best regards,Magnus
go to post Güvenal · Oct 5, 2017 Hello,First thanks to everyone who contributed, Mauri Kaatrasalo was the one who led me in the direction to my final solution but I learned something new from all of you.So using FileStream setting Ensamble creates 2 files, one under the Ensamble installation and one in the stream folder of the namespace. Ensamble will delete the one under the ensamble installation after being done with it’s job, so the one left to care about is the one in the stream folder of the namespace.What I ended up doing in short is… #Turned on the service’s UseFileStream propterty.#Created a subclass of EnsLib.FTP.InboundAdapter, where I added Property for “StreamedFileName”#During processFile I save the filename ensamble gave the tempfile it is creating in “StreamedFileName” property.#In the service after sending the file to the EnsLib.FTP.PassthroughOperation I delete the resulting stream file using the value in the ..Adapter.StreamedFileName property.Best regards,Magnus
go to post Güvenal · Sep 18, 2017 Hello Dmitry!I just started working with ensamble and this was my first post in the community, must say I am super impressed with the fast turnaround.Thank you very much!//Magnus