LIBSAFE Flexible Intake
  • What is Flexible Intake
  • Flexible Intake Benefits
  • CONCEPTS
    • Overview
    • Organize your content
    • OAIS and ISO 16363
      • Understanding OAIS and ISO 16363
      • Flexible Intake support for OAIS Conformance
      • Planning for preservation
      • ISO 16363 certification guide
  • GET STARTED
    • Create a data container
    • Upload content
    • Download content
    • Introduction to metadata
    • Search
    • File versioning and recovery
    • Work with data containers
    • Functions
    • Storage mode transitions
    • Jupyter Notebooks
  • CONFIGURATION
    • Archive organization
    • Container templates
    • Configure metadata
    • Users and Permissions
  • REPORTS
    • Introduction
    • Data Analytics Reports
    • Container Tab Reports
  • DEVELOPER'S GUIDE
    • Functions
    • Using the API
    • Functions gallery
  • COOKBOOK
    • AWS CLI with Flexible Intake
    • Using S3 Browser
    • Using FileZilla Pro
    • Getting your S3 bucket name
    • Getting your S3 storage credentials
    • Advanced API File Search
    • Tips for faster uploads
    • Configuring Azure SAML-based authentication
    • Create a manifest before transferring files
  • File Browser
    • Supported formats for preview
    • Known issues and limitations
    • Changelog and Release Notes
Powered by GitBook
On this page
  • Search using the Management Interface
  • Search using the API
  • Search by container
  • File name search
  • Metadata search

Was this helpful?

  1. GET STARTED

Search

PreviousIntroduction to metadataNextFile versioning and recovery

Last updated 3 years ago

Was this helpful?

Flexible Intake provides a user-friendly, easy to use web interface for searching alongside a full API for Query DSL (Domain Specific Language) based on JSON to define queries, that supports the to search for items.

This guide is just an introduction to the platform's capabilities for you to get familiar with them.

Here you can find:

  • How to search using the Management Interface

  • How to do basic search using the API.

Search using the Management Interface

  1. Sign in to the platform's Management Interface and go to Content Search:

  1. You can introduce your search query:

(1) Select here if you want to search in the items that are inside the containers or if you want to search by the container's metadata.

(2) Introduce your query here. It could be simply a word or it could be a metadata-based query if you start typing any metadata field:

(3) Or you can make an advanced query selecting the {;} symbol:

(4) With this option you can restrict the types of data that the platform is going to search in:

  • Metadata: For searching in the item metadata

  • File content: For searching in the item content (full text in a PDF for instance), for the indexed documents

  • Embedded metadata: For searching in the item's embedded metadata (EXIF metadata for images, headers for PDF files, etc.)

  • File name and path: For searching based on the item name.

(5) For restricting your search to a particular archive node or group of containers.

(6) For filtering based on content tags.

(7) For filtering by file format (if the content is characterized).

And (8), (9) and (10) to browse your results.

Search using the API

  1. Sign in to the platform's Management Interface

  2. Obtain your API key selecting your name, then Access Methods and then follow one of the following methods:

Search by container

To get a list of every item in the container with all properties use this method:

curl --re quest POST \
  --url "$your_platform_url/api/file/elastic" \
  --header "Content-Type: application/json" \
  --header "authorization: Bearer $your_platform_api_key" \
  --data '{
    "must": [
        {
            "term": {
                "container_id": 3
            }
        }
    ]
}'

Use:

  • url: Your platform address

  • header: Your API Token (add Bearer prefix)

  • container_id: The id of the container to list.

You can also request the file list of more than one data container with a single query:

curl --request POST \
  --url "$your_platform_url/api/file/elastic" \
  --header "Content-Type: application/json" \
  --header "authorization: Bearer $your_platform_api_key" \
  --data '{
    "must": [
        {
            "terms": {
                "container_id": [
                    1,
                    2
                ]
            }
        }
    ]
}'

File name search

When users are uploading a file to the platform, search results may not show the new file for a while. Consider this in your code when you are uploading and immediately after the upload you need to search for the uploaded file.

To get a list of every item in the container with all properties, use this method:

curl --request GET  --url "$your_platform_url/api/file" \
       --header "Content-Type: application/json" \
       --header "authorization: Bearer $your_platform_api_key" \
       --data '{
          "conditions": [
              {
                  "container_id": 185
              }
                        ],
          "limit": 100,
          "offset": 0
      }'

Or if you are looking for all files in container 185, with a size larger than 702 bytes and characterized as a PDF 1.5 (PRONOM fmt/19), you can use:

curl --request GET  --url "$your_platform_url/api/file" \
       --header "Content-Type: application/json" \
       --header "authorization: Bearer $your_platform_api_key" \
       --data '{
          "conditions": [
              {
                  "container_id": 185
              },
              {
                  "size": {
                      "operator": "gt",
                      "value": 702
                  }
              },
              {
                  "type": "FILE"
              },
              {
                  "format": "fmt\/19"
              }
          ],
          "limit": 100,
          "offset": 0
      }'

Metadata search

When users are updating metadata for an object, search results may not show the updated element for a while. Consider this in your code when you are updating the metadata and immediately after the edit you need to search for it.

It is possible to search for any of the metadata associated to your items (item metadata, item embedded metadata -if available-, file hash, etc.). It is also possible to create complex queries combining multiple query types into one, and to use wildcards:

curl --request POST \
  --url "$your_platform_url/api/file/elastic" \
  --header "Content-Type: application/json" \
  --header "authorization: Bearer $your_platform_api_key" \
  --data '{
    "must": [
        {
            "nested": {
                "path": "metadata",
                "query": {
                    "simple_query_string": {
                        "analyze_wildcard": true,
                        "fields": [
                            "metadata.author"
                        ],
                        "query": "albert*",
                        "default_operator": "and"
                    }
                }
            }
        }
    ]
}'

API examples here are just illustrative. Check the for additional information and all available methods.

This section is just an introduction. Many operators and properties are available for search. Make sure you read .

API documentation
Advanced API file search
ElasticSearch syntax