Logo de Go Africa Online

GET
https://www.goa.goafrica.syazen.cloud/na/pros

Response:
200
IP:
216.73.216.18
Date:
4 août 2025 à 10:26:54
Total execution time:
28 ms
Token:
DRiXI74FcVLtbosE4IX-

Elastic queries

Time Request
3 ms
Path : /goafrica_search_engine/_search
Method : POST
{
    "track_total_hits": true,
    "size": 0,
    "aggs": {
        "maxFeedPostsPerUser": {
            "max": {
                "field": "user_count_feed_posts"
            }
        },
        "maxFollowersPerUser": {
            "max": {
                "field": "user_count_followers"
            }
        },
        "oldestRegistrationDateUnix": {
            "min": {
                "field": "user_registration_date"
            }
        },
        "maxConnectionsPerUser": {
            "max": {
                "field": "user_count_connections"
            }
        },
        "maxReactionsReceivedPerUser": {
            "max": {
                "field": "user_count_reactions_received"
            }
        },
        "maxReactionsMadePerUser": {
            "max": {
                "field": "user_count_reactions_made"
            }
        }
    }
}
3 ms
Path : /goafrica_search_engine/_search
Method : POST
{
    "query": {
        "script_score": {
            "script": {
                "source": "     \n                              double compositeScore = 0.0;\n                              if(params['maxConnectionsPerUser'] != null && params['maxConnectionsPerUser'] > 0 && params['oldestRegistrationDateUnix'] != null) {\n                                    ZonedDateTime today = ZonedDateTime.parse(params['now']);\n                                    ZonedDateTime memberSince = !doc['user_registration_date'].empty ? (doc['user_registration_date'].value) : today;\n                                    Instant instant = Instant.ofEpochMilli(params['oldestRegistrationDateUnix']);\n                                    ZonedDateTime oldestRegistrationDate = ZonedDateTime.ofInstant(instant, ZoneId.of('Z'));\n                                    long daysRegistered = ChronoUnit.DAYS.between(memberSince,today);\n                                    long maxDaysRegistered = ChronoUnit.DAYS.between(oldestRegistrationDate,today);\n                                    long connectionsThisMonth = doc['user_count_connections'].value;\n                                    compositeScore = compositeScore + daysRegistered*1.0 / maxDaysRegistered * connectionsThisMonth / params['maxConnectionsPerUser'] * params['weights_seniorityAndPresence'];\n                              }\n\n                              compositeScore = compositeScore\n                                + ((doc['user_has_experiences'].value) ? params['weights_hasExperiences'] : 0)\n                                + ((doc['user_has_formations'].value) ? params['weights_hasFormations'] : 0)\n                                + ((doc['user_has_resume'].value) ? params['weights_hasResume'] : 0)\n                                + ((!doc['user_category.id'].empty) ? params['weights_hasCategory'] : 0.0)\n                                + ((!doc['user_profile_title.raw'].empty) ? params['weights_hasTitle'] : 0.0)\n                                + ((!doc['user_profile_description.raw'].empty) ? params['weights_hasShortDesc'] : 0.0)\n                                + ((!doc['user_education_level'].empty) ? params['weights_hasEducationLevel'] : 0.0)\n                                + ((doc['user_profile_photo_status_valid'].value) ? params['weights_hasProfilePhoto'] : 0.0)\n                                + ((doc['user_count_languages'].value > 0) ? params['weights_hasLanguages'] : 0.0);\n                                \n                                if(params['maxFollowersPerUser'] != null && params['maxFollowersPerUser'] > 0) {\n                                    compositeScore += (params['weights_followersCount'] * (doc['user_count_followers'].value) * 1.0 / params['maxFollowersPerUser'])\n                                }\n                                if(params['maxFeedPostsPerUser'] != null && params['maxFeedPostsPerUser'] > 0) {\n                                    compositeScore += (params['weights_feedPostsCount'] * (doc['user_count_feed_posts'].value) * 1.0 / params['maxFeedPostsPerUser'])\n                                }\n                                if(params['maxReactionsReceivedPerUser'] != null && params['maxReactionsReceivedPerUser'] > 0) {\n                                    compositeScore += (params['weights_reactionsReceivedCount'] * (doc['user_count_reactions_received'].value) * 1.0 / params['maxReactionsReceivedPerUser'])\n                                }\n                                if(params['maxReactionsMadePerUser'] != null && params['maxReactionsMadePerUser'] > 0) {\n                                    compositeScore += (params['weights_reactionsMadeCount'] * (doc['user_count_reactions_made'].value) * 1.0 / params['maxReactionsMadePerUser'])\n                                }\n                                return Math.floor(_score * 100) + compositeScore / 100\n                      ",
                "params": {
                    "now": "2025-08-04T08:26:54.533Z",
                    "weights_seniorityAndPresence": 10,
                    "weights_hasTitle": 10,
                    "weights_hasShortDesc": 5,
                    "weights_hasCategory": 3,
                    "weights_hasExperiences": 5,
                    "weights_hasFormations": 5,
                    "weights_hasEducationLevel": 4,
                    "weights_hasResume": 3,
                    "weights_hasVideo": 10,
                    "weights_hasProfilePhoto": 15,
                    "weights_hasLanguages": 5,
                    "weights_followersCount": 10,
                    "weights_feedPostsCount": 5,
                    "weights_reactionsMadeCount": 5,
                    "weights_reactionsReceivedCount": 5
                }
            },
            "query": {
                "bool": {
                    "must": [],
                    "filter": {
                        "bool": {
                            "must": [
                                {
                                    "term": {
                                        "_type": "user"
                                    }
                                },
                                {
                                    "exists": {
                                        "field": "user_fullname"
                                    }
                                },
                                {
                                    "exists": {
                                        "field": "user_count_connections"
                                    }
                                },
                                {
                                    "bool": {
                                        "must_not": [
                                            {
                                                "term": {
                                                    "user_fullname": ""
                                                }
                                            }
                                        ]
                                    }
                                },
                                {
                                    "term": {
                                        "user_country": {
                                            "value": "na",
                                            "case_insensitive": true
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        }
    },
    "track_total_hits": 109970,
    "size": 30,
    "from": 0
}