This file contains 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
GET /posts/_search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ "match": { "title": "Exploring Elasticsearch Models" } } | |
] | |
} | |
}, | |
"inner_hits": { |
This file contains 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
POST /blog/posts/1 | |
{ | |
"title": "Elasticsearch Modeling", | |
"content": "A post about data modeling in Elasticsearch" | |
} | |
POST /blog/comments/2?parent=1 | |
{ | |
"text": "Great post!" | |
} |
This file contains 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
{ | |
"comment_id": "101", | |
"text": "Great overview of data modeling!", | |
"post_id": "1" | |
} |
This file contains 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
{ | |
"post_id": "1", | |
"title": "Introduction to Elasticsearch Data Modeling", | |
"content": "Exploring various data modeling options in Elasticsearch." | |
} |
This file contains 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
PUT my-index-000001 | |
{ | |
"mappings": { | |
"properties": { | |
"post_id": { | |
"type": "keyword" | |
}, | |
"post_id": { | |
"type": "join", | |
"relations": { |
This file contains 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
{ | |
"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!" | |
}, | |
{ |
This file contains 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
Query item: x | |
| | |
^ | | |
| x Item 1| | |
| / | | |
| / | | |
| /x Item 2 | | |
| / | | |
| / | | |
| /x Item 3 | |
This file contains 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
^ | |
| x Item 1 | |
| / | |
| / | |
| /x Item 2 | |
| / | |
| / | |
| /x Item 3 | |
| / | |
| / |
This file contains 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
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] |
This file contains 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
import pandas as pd | |
df = pd.read_csv("data/labelled_2021may-ip-10-100-1-186.csv") | |
print(df) |