Last active
July 26, 2016 21:57
-
-
Save SylvainEstevez/4d9dd78286da0c6e1b2934d244a7b305 to your computer and use it in GitHub Desktop.
weights
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const tokenFieldsWeights = { | |
| id: 100, | |
| dependency_id: 80, | |
| task_id: 80, | |
| actor_id: 60, | |
| actor_owner_id: 40, | |
| actor_owner_type: 30 | |
| actor_type: 20 | |
| }; | |
| const operatorWeights = { | |
| eq: 100, | |
| in: 80, | |
| nin: 70, | |
| ne: 60, | |
| gt: 50, | |
| gte: 50, | |
| lt: 50, | |
| lte: 50 | |
| }; | |
| /** | |
| * id__eq = 1 => 10000 | |
| * id__in = 1,2,3 => 8000 | |
| * actor_id__gte = 155 => 3000 | |
| * actor_id__eq = 2 => 6000 | |
| * actor_owner_type__eq = 2 => 3000 | |
| * actor_owner_type__in = customer,organisation => 2100 | |
| */ |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tokenFieldsWeightsdefaults to [primaryKey, ...allOtherFields] and is to be defined/fine-grained manually for each resource.likeoperator, there was one innootbut I did not report it torestypie. Doable if needed.