def _get_network_index_definition(number_of_shards, number_of_replicas):
    """
    Constructs the Network index with a given number of shards and replicas.
    Each connection is stored as individual ES documents
    :param number_of_shards: Number of shards for the network index.
    :param number_of_replicas: Number of replicas for the network index.

    The index has the following parts:
         linked: Date when the link was made. Stored in ISO 8601 format.
                See https://docs.python.org/3.6/library/datetime.html#datetime.date.isoformat for more info.
         actor_id: Single word. The actor who's connection is being declared. For example if the actor "mark" is
                                following two people then "mark" would appear twice, one per connection.
         link_type: Single word in infinitive. The kind of link being declared. For example: Follow, Watch

         linked_activity: Linked activity to this link in the network
         linked_activity.activity_class: Single word. The type of activities that are being followed and watched.
                                         This must be either "actor" or "object"
         linked_activity.type: Single word. The type of feed component that is being followed or watched. For example
                               if the class is "actor" then it's type could be "Person", "User" or "Member".
                               If the class is "object" then its type could be "Document", or "Project".
         linked_activity.id: Single ID. The ID that is being followed or watched.

         link_weight: Numeric. Accept decimals. The wight of the connection. For example, if Mark follows Jane and
                      Katie depending on their interaction in social platform the connection between Mark and Jane
                      could be twice as strong as Mark and Katie, thus Mark and Katie will have a weight of 1 while
                      Mark and Jane will have a weight of 2. By default each connection has a weight of 1.
         extra: Use this field to store extra information at link level.
                IMPORTANT NOTE: This field is "non-analyzable" which means that ES does not perform any
                operations on it thus it cannot be used to order, aggregate, or filter query results.

    :return: A JSON object with the definition of the Network index.
    """
    _json = {
        "settings": {
            "index": {
                "number_of_shards": number_of_shards,
                "number_of_replicas": number_of_replicas,
            }
        },
        "mappings": {
            "properties": {
                "linked": {"type": "date"},
                "actor_id": {"type": "keyword"},
                "link_type": {"type": "keyword"},
                "linked_activity": {
                    "properties": {
                        "activity_class": {"type": "keyword"},
                        "id": {"type": "keyword"},
                        "type": {"type": "keyword"},
                    }
                },
                "link_weight": {"type": "float"},
                "extra": {"type": "object", "enabled": "false"},
            }
        },
    }
    return _json