In order to support filter and order in our dapp, we need to get encoded composite definition from already existing model stream ids.
but calling devtools.Composite.fromModels dose NOT return indices Field.
you could reproduce this using following model
https://s3.xyz/models/modelview/kjzl6hvfrbw6c5sfh4zjss0pmc5x99sjdjbcu7zz8up5t7k0yvsybwvn2701o6k?network=MAINNET
after run cli command
composedb composite:from-model kjzl6hvfrbw6c5sfh4zjss0pmc5x99sjdjbcu7zz8up5t7k0yvsybwvn2701o6k kjzl6hvfrbw6c6vwzcigxgsnskmtkwodxnxzy0fzasxs6apumpv67q9sip974ry
you will get composite schema, which missing indices
{
"version": "1.0",
"models": {
"kjzl6hvfrbw6c5sfh4zjss0pmc5x99sjdjbcu7zz8up5t7k0yvsybwvn2701o6k": [
{
"jws": {
"payload": "AXESIG6P7pKKzNQCveq2jabKCyt5biJLz_SiaaqZAG8iVDU6",
"signatures": [
{
"signature": "9pW3prqQ7_jjHT9mV8rvmOtsQxCf_6KUcH3NSAomc6Y48ENfzA1fetMmkYBem88HsG9EE4atTkIbylfG8C6dCw",
"protected": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa21tSzlHVndLZkVtWDRtSkhjblFmaUQ3NlNTQ3k2Mk41NGJZWHNkRDVyTGVHI3o2TWttbUs5R1Z3S2ZFbVg0bUpIY25RZmlENzZTU0N5NjJONTRiWVhzZEQ1ckxlRyJ9"
}
],
"link": "bafyreidor7xjfcwm2qbl32vwrwtmuczlpfxces6p6srgtkuzabxsevbvhi"
},
"linkedBlock": "omRkYXRhp2RuYW1lZ0Jpb0xpbmtldmlld3OjZ2NyZWF0b3KhZHR5cGVvZG9jdW1lbnRBY2NvdW50Z3Byb2ZpbGWjZHR5cGVwcmVsYXRpb25Eb2N1bWVudGVtb2RlbHg/a2p6bDZodmZyYnc2YzZ2d3pjaWd4Z3Nuc2ttdGt3b2R4bnh6eTBmemFzeHM2YXB1bXB2NjdxOXNpcDk3NHJ5aHByb3BlcnR5aXByb2ZpbGVJRGd2ZXJzaW9uoWR0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lwZWVhcnJheWVpdGVtc6JkdHlwZWZzdHJpbmdpbWF4TGVuZ3RoGDxobWF4SXRlbXMUZmF2YXRhcqJkdHlwZWZzdHJpbmdpbWF4TGVuZ3RoGQPoZ3dhbGxldHOjZHR5cGVlYXJyYXllaXRlbXOhZCRyZWZuIy8kZGVmcy9XYWxsZXRobWF4SXRlbXMUdGFkZGl0aW9uYWxQcm9wZXJ0aWVz9Gd2ZXJzaW9uYzEuMGlyZWxhdGlvbnOga2Rlc2NyaXB0aW9ueBhwcm9maWxlIGZvciB1czNyLW5ldHdvcmtvYWNjb3VudFJlbGF0aW9uoWR0eXBlZnNpbmdsZWZoZWFkZXKjY3NlcGVtb2RlbGVtb2RlbFLOAQQBcXELAAlobW9kZWwtdjFrY29udHJvbGxlcnOBeDhkaWQ6a2V5Ono2TWttbUs5R1Z3S2ZFbVg0bUpIY25RZmlENzZTU0N5NjJONTRiWVhzZEQ1ckxlRw=="
}
]
},
"indices": {},
"aliases": {},
"views": {
"account": {},
"root": {},
"models": {}
}
}
the right composite schema (saved while create model) is
{
"version": "1.0",
"models": {
"kjzl6hvfrbw6c6vwzcigxgsnskmtkwodxnxzy0fzasxs6apumpv67q9sip974ry": [
{
"jws": {
"payload": "AXESIOHbHVmGyD2Swa5Xkdx1zHr9rXv31KztltQxTWR9RRue",
"signatures": [
{
"signature": "K_qD3g7x4UnQGkc_ePptu-uG2ds1EAAD5Sk61e4Fo2Mo6E5kukQmsq-yrJ3fCog6ztDAxqGGOtQYhDCPA-06AA",
"protected": "eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDprZXk6ejZNa21tSzlHVndLZkVtWDRtSkhjblFmaUQ3NlNTQ3k2Mk41NGJZWHNkRDVyTGVHI3o2TWttbUs5R1Z3S2ZFbVg0bUpIY25RZmlENzZTU0N5NjJONTRiWVhzZEQ1ckxlRyJ9"
}
],
"link": "bafyreihb3movtbwihwjmdlsxshohltd27wwxx56uvtwznvbrjvsh2ri3ty"
},
"linkedBlock": "omR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W1hLm9yZy9kcmFmdC8yMDIwLTEyL3NjaGVtYWhyZXF1aXJlZINocGxhdGZvcm1maGFuZGxlaXByb2ZpbGVJRGpwcm9wZXJ0aWVzpWRkYXRhomR0eXBlZnN0cmluZ2ltYXhMZW5ndGgaAAGGoGZoYW5kbGWiZHR5cGVmc3RyaW5naW1heExlbmd0aBhkZ25ldHdvcmuiZHR5cGVmc3RyaW5naW1heExlbmd0aBhkaHBsYXRmb3JtomR0eXBlZnN0cmluZ2ltYXhMZW5ndGgYZGlwcm9maWxlSUShZCRyZWZ3Iy8kZGVmcy9DZXJhbWljU3RyZWFtSUR0YWRkaXRpb25hbFByb3BlcnRpZXP0Z3ZlcnNpb25jMS4waXJlbGF0aW9uc6FpcHJvZmlsZUlEomR0eXBlaGRvY3VtZW50ZW1vZGVseD9ranpsNmh2ZnJidzZjNnZ3emNpZ3hnc25za210a3dvZHhueHp5MGZ6YXN4czZhcHVtcHY2N3E5c2lwOTc0cnlrZGVzY3JpcHRpb254HXNvY2lhbCBsaW5rcyBmb3IgdXMzci1uZXR3b3Jrb2FjY291bnRSZWxhdGlvbqFkdHlwZWRsaXN0ZmhlYWRlcqNjc2VwZW1vZGVsZW1vZGVsUs4BBAFxcQsACWhtb2RlbC12MWtjb250cm9sbGVyc4F4OGRpZDprZXk6ejZNa21tSzlHVndLZkVtWDRtSkhjblFmaUQ3NlNTQ3k2Mk41NGJZWHNkRDVyTGVH"
}
]
},
"indices": {
"kjzl6hvfrbw6c6vwzcigxgsnskmtkwodxnxzy0fzasxs6apumpv67q9sip974ry": [],
"BioLink": [
{
"fields": [
{
"path": [
"platform"
]
}
]
},
{
"fields": [
{
"path": [
"network"
]
}
]
},
{
"fields": [
{
"path": [
"handle"
]
}
]
}
]
},
"aliases": {},
"views": {
"account": {},
"root": {},
"models": {
"kjzl6hvfrbw6c6vwzcigxgsnskmtkwodxnxzy0fzasxs6apumpv67q9sip974ry": {}
}
}
}