Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Is it feasible to sort 50 000 objects on-chain?

Suppose I need to store 50 000 objects and have the ability to sort them (e.g., find an object with the minimal value of some parameter). Is it possible and reasonable to do that on-chain, or does that require an off-chain backend?

This question was imported from Telegram Chat: https://t.me/tondev/114394

Posted 6 months ago
Votes Newest


Performing complex calculations on-chain can be expensive, so if there is
such an opportunity, it is better to move these calculations to the off-chain backend. Ideally, if complex calculations are performed off-chain, in a smart contract it is enough only to check the correctness of these calculations.

Posted 6 months ago
Daniil Sedov
219 × 6 Administrator
1 Answer
6 months ago
6 months ago