Skip to content

Instantly share code, notes, and snippets.

GET /posts/_search
{
"query": {
"bool": {
"must": [
{ "match": { "title": "Exploring Elasticsearch Models" } }
]
}
},
"inner_hits": {
POST /blog/posts/1
{
"title": "Elasticsearch Modeling",
"content": "A post about data modeling in Elasticsearch"
}
POST /blog/comments/2?parent=1
{
"text": "Great post!"
}
{
"comment_id": "101",
"text": "Great overview of data modeling!",
"post_id": "1"
}
{
"post_id": "1",
"title": "Introduction to Elasticsearch Data Modeling",
"content": "Exploring various data modeling options in Elasticsearch."
}
PUT my-index-000001
{
"mappings": {
"properties": {
"post_id": {
"type": "keyword"
},
"post_id": {
"type": "join",
"relations": {
{
"post_id": "1",
"title": "Introduction to Elasticsearch Data Modeling",
"content": "Exploring various data modeling options in Elasticsearch.",
"comments": [
{
"comment_id": "101",
"text": "Great overview of data modeling!"
},
{
Query item: x
|
^ |
| x Item 1|
| / |
| / |
| /x Item 2 |
| / |
| / |
| /x Item 3 |
^
| x Item 1
| /
| /
| /x Item 2
| /
| /
| /x Item 3
| /
| /
curl -X POST \
"http://localhost:6566/get-online-features" \
-d '{
"features": [
"kernel_activity_features:processName",
"kernel_activity_features:processId",
"kernel_activity_features:eventName"
],
"entities": {
"userId": [0]
import pandas as pd
df = pd.read_csv("data/labelled_2021may-ip-10-100-1-186.csv")
print(df)