Elasticsearch DSL

Data type:

Query type:

URL:

Employee Posts

Elasticsearch DSL

https://api.coresignal.com/cdapi/v2/post_employee/search/es_dsl


Overview

Use the /v2/post_employee/search/es_dsl endpoint for more sophisticated queries.

Additionally, the endpoint allows you to operate filters that mimic our job posting data, enabling you to write more sophisticated queries than using the /v2/post_employee/search/filter endpoint.

Elasticsearch schema

Elasticsearch schema
Elastic schema
{
    "mappings": {
        "properties": {
            "id": {
                "type": "keyword"
            },
            "url": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "author_name": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "author_profile_url": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "author_headline": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "author_posts_count": {
                "type": "long"
            },
            "date_published": {
                "type": "date"
            },
            "article_body": {
                "type": "text"
            },
            "image_url": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "hashtags": {
                "type": "text",
                "fields": {
                    "exact": {
                        "type": "keyword"
                    }
                }
            },
            "mentions": {
                "type": "nested",
                "properties": {
                    "full_name": {
                        "type": "text",
                        "fields": {
                            "exact": {
                                "type": "keyword"
                            }
                        }
                    },
                    "url": {
                        "type": "text",
                        "fields": {
                            "exact": {
                                "type": "keyword"
                            }
                        }
                    }
                }
            },
            "reaction_count": {
                "type": "long"
            },
            "comment_count": {
                "type": "long"
            },
            "comments": {
                "type": "nested",
                "properties": {
                    "full_name": {
                        "type": "text",
                        "fields": {
                            "exact": {
                                "type": "keyword"
                            }
                        }
                    },
                    "headline": {
                        "type": "text",
                        "fields": {
                            "exact": {
                                "type": "keyword"
                            }
                        }
                    },
                    "profile_url": {
                        "type": "text",
                        "fields": {
                            "exact": {
                                "type": "keyword"
                            }
                        }
                    },
                    "body": {
                        "type": "text"
                    },
                    "reaction_count": {
                        "type": "long"
                    },
                    "date_published": {
                        "type": "date"
                    }
                }
            }
        }
    }
}

Sorting options

Find several examples of the available sorting options. All information about the sorting is in the general Elasticsearch DSL topic.

Sort by ID
{
    "query": {
        "match": {
            "author_name":{
                "query":"John Smith",
                "operator": "and"
            }
        }
    },
    "sort": [
        "id"
    ]
}

Last updated

Was this helpful?