> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/opencontent/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/opencontent/use-and-explore/lab-upload/lab-4-search.md).

# Lab 4: Search

Learn how to perform search towards Open Content /search/ endpoint

A small tool for Open Content API test can be used for easier learning of Open Content search API. The UI can be accessed from the url `http://localhost:8800` when Open Content docker-compose is started. T

{% hint style="info" %}
This tool purpose is to make it easier to design search questions towards Open Content. It is not used in production environments.
{% endhint %}

The configuration in these exercises uses **nested properties** and assumes that you have the content from lab 1-3 uploade&#x64;**.**

### To perform a simple search without any arguments : <a href="#to-perform-a-simple-search-without-any-arguments" id="to-perform-a-simple-search-without-any-arguments"></a>

```
curl -s -u admin:admin "http://localhost:8080/opencontent/search?" | jq .
```

### Get only the uuid property for each hit <a href="#get-only-the-uuid-property-for-each-hit" id="get-only-the-uuid-property-for-each-hit"></a>

```
curl -s -u admin:admin "http://localhost:8080/opencontent/search?\
properties=uuid" | jq .
```

### Get only Articles and the uuid  <a href="#get-only-articles-and-the-uuid" id="get-only-articles-and-the-uuid"></a>

```
curl -s -u admin:admin "http://localhost:8080/opencontent/search?\
q=contenttype:Article&\
properties=uuid"
```

### Get Articles and the concept names <a href="#get-articles-and-the-concept-names" id="get-articles-and-the-concept-names"></a>

```
curl --globoff -s -u admin:admin "http://localhost:8080/opencontent/search?\
q=contenttype:Article&\
properties=uuid,ConceptRelations[ConceptName]" | jq .
```

### Get Articles and only Weekend Concept <a href="#get-articles-and-only-weekend-concept" id="get-articles-and-only-weekend-concept"></a>

```
curl -s --globoff -u admin:admin "http://localhost:8080/opencontent/search?\
q=contenttype:Article&\
properties=uuid,ConceptRelations[ConceptName]&\
filters=ConceptRelations(q=ConceptName:Weekend)" | jq .
```

[<br>](https://bringert.gitbook.io/open-content/upload-lab/lab-3-article-upload)
