Skip to content

Commit a96f381

Browse files
authored
Merge pull request #42 from hsf-training/opensearch
closing some issues
2 parents 5d1e382 + 2b7f0eb commit a96f381

File tree

5 files changed

+37
-57
lines changed

5 files changed

+37
-57
lines changed

CITATION

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
cff-version: 1.2.0
22
message: "Please cite the following works when using this software."
33
type: software
4-
title: "Matplotlib for HEP"
5-
abstract: "A training module that introduces Matplotlib and commonly used plots in HEP."
4+
title: "Introduction to Databases for HEP"
5+
abstract: "A training module that introduces database management system (SQL and NoSQL) with examples in HEP."
66
authors:
7-
- family-names: "Oan Evans"
8-
given-names: "Meirin"
9-
orcid: "https://orcid.org/0000-0002-4259-018X"
10-
affiliation: "University of Sussex"
11-
- family-names: "García Hernández"
12-
given-names: "Marcela"
13-
orcid: "https://orcid.org/0000-0003-2393-3367"
14-
affiliation: "Center for Research and Advanced Studies of the National Polytechnic Institute"
7+
- family-names: "Panta"
8+
given-names: "Anil"
9+
orcid: "https://orcid.org/0000-0001-6385-7712"
10+
affiliation: "Thomas Jefferson National Accelerator Facility"
11+
- family-names: "Enrique Hernández Villanueva"
12+
given-names: "Michel"
13+
orcid: "https://orcid.org/0000-0002-6322-5587"
14+
affiliation: "Brookhaven National Laboratory"
15+
- family-names: "Mashinistov"
16+
given-names: "Ruslan"
17+
orcid: "https://orcid.org/0000-0001-7925-4676"
18+
affiliation: "Brookhaven National Laboratory"
19+
- family-names: "Skipsey"
20+
given-names: "Sam"
21+
orcid: ""
22+
affiliation: ""
1523
- family-names: "Antonio Fidalgo-Rodríguez"
1624
given-names: "Guillermo"
1725
orcid: "https://orcid.org/0000-0001-8605-9772"
1826
affiliation: "University of Puerto Rico, Mayagüez Campus"
19-
- family-names: "Moreno Briceño"
20-
given-names: "Alexander"
21-
orcid: "https://orcid.org/0000-0001-8415-2543"
22-
affiliation: "Universidad Antonio Nariño"
23-
repository-code: "https://github.com/hsf-training/hsf-training-matplotlib"
24-
url: "https://hsf-training.github.io/hsf-training-matplotlib/"
27+
- family-names: "Lukashenko"
28+
given-names: "Valeriia"
29+
orcid: "https://orcid.org/0000-0002-0630-5185"
30+
affiliation: "Institute for Nuclear Research"
31+
repository-code: "https://github.com/hsf-training/hsf-training-databases-basics"
32+
url: "https://github.com/hsf-training/hsf-training-databases-basics"
2533
keywords:
2634
- hep
27-
- matplotlib
35+
- database
2836
- python
2937
- training
3038
license: "CC-BY-4.0"

_episodes/02-sql-basics.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ title: "MySQL Basics"
33
teaching: x
44
exercises: x
55
questions:
6-
- ""
7-
- ""
6+
- "What are the core SQL commands you need to know to interact with a MySQL database?"
7+
- "How do you create, update, and delete records in a MySQL database?"
88
objectives:
9-
- ""
10-
- ""
9+
- "Understand the basic SQL commands used in MySQL."
10+
- "Learn how to create a database and tables in MySQL."
11+
- "Practice inserting, updating, and deleting records in a MySQL table."
1112
keypoints:
12-
- ""
13-
- ""
13+
- "SQL commands are the building blocks for interacting with a MySQL database."
14+
- "Creating a database and tables is the first step in structuring your data."
15+
- "Inserting, updating, and deleting records allows you to manage data effectively."
1416
---
1517

1618

_episodes/09-opensearch-queires.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ title: "Opensearch Queries"
33
teaching: x
44
exercises: 6
55
questions:
6-
- ""
7-
- ""
8-
6+
- "How to perform indexing in Opensearch?"
7+
- "How to query and filter records in opensearch?"
98
objectives:
109
- "Understand the basic structure of Opensearch queries."
1110
- "Learn how to create and manage indices in Opensearch."
1211
- "Practice using different types of queries such as term queries, range queries, and compound queries."
1312
- "Gain familiarity with updating and deleting documents in Opensearch."
14-
1513
keypoints:
1614
- "Opensearch queries can be used to search, update, and delete documents in an Opensearch index."
1715
- "Indices in Opensearch define the structure and mapping of documents."
@@ -228,7 +226,6 @@ for hit in search_results["hits"]["hits"]:
228226
> > ```python
229227
> > search_query = {"query": {"term": {"data_type": "mc"}}}
230228
> > search_results = es.search(index=index_name, body=search_query)
231-
232229
> > for hit in search_results["hits"]["hits"]:
233230
print(hit["_source"]["filename"])
234231
> > ```
@@ -288,7 +285,6 @@ for hit in search_results["hits"]["hits"]:
288285
> > }
289286
> > }
290287
> > search_results = es.search(index=index_name, body=search_query)
291-
292288
> > for hit in search_results["hits"]["hits"]:
293289
> > print(hit["_source"]["filename"])
294290
> > ```
@@ -417,7 +413,6 @@ for hit in search_results["hits"]["hits"]:
417413
> > }
418414
> > }
419415
> > search_results = es.search(index=index_name, body=search_query)
420-
421416
> > for hit in search_results["hits"]["hits"]:
422417
print(hit["_source"]["filename"])
423418
> > ```
@@ -460,7 +455,6 @@ for hit in search_results["hits"]["hits"]:
460455
> > }
461456
> > }
462457
> > search_results = es.search(index=index_name, body=search_query)
463-
464458
> > for hit in search_results["hits"]["hits"]:
465459
print(hit["_source"]["filename"])
466460
> > ```

_episodes/10-text-based-search.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: "Opensearch Text Based Queries"
33
teaching: x
44
exercises: 2
55
questions:
6-
- ""
7-
- ""
6+
- "How to perform text based search in opensearch?"
7+
- "What are the ways to do text based search in opensearch?"
88

99
objectives:
1010
- "Understand the fundamental query types in Opensearch for text-based searches."
@@ -62,7 +62,6 @@ for hit in search_results["hits"]["hits"]:
6262
> > }
6363
> >}
6464
> > search_results = es.search(index=index_name, body=search_query)
65-
6665
> > for hit in search_results["hits"]["hits"]:
6766
print(hit["_source"]["filename"])
6867
> > ```
@@ -138,7 +137,6 @@ for hit in search_results["hits"]["hits"]:
138137
> > }
139138
> >}
140139
> > search_results = es.search(index=index_name, body=search_query)
141-
142140
> > for hit in search_results["hits"]["hits"]:
143141
print(hit["_source"]["filename"])
144142
> > ```

setup.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,28 +106,6 @@ at the [official documentation](https://mariadb.org/). At the time of writing th
106106
commands are compatible with each other.
107107

108108

109-
# Elasticsearch setup
110-
111-
## Option 1: Use a Docker container
112-
```bash
113-
docker run -d --name=myelasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.15.2
114-
```
115-
116-
> ## TODO:
117-
> instruct user to make it secure
118-
{: .caution}
119-
120-
```bash
121-
docker exec -it myelasticsearch /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
122-
```
123-
124-
To test that if everything is up and running, execute the following command:
125-
```bash
126-
curl -X GET "http://localhost:9200/"
127-
```
128-
If Elasticsearch is running, you'll receive a JSON response with server information.
129-
130-
131109
# Opensearch setup
132110

133111
```bash

0 commit comments

Comments
 (0)