# Hop Search

## Hop Search

Hop Search is a command line tool to search for metadata in Hop or a Hop project.

&#x20;

Usage

\== Usage

```highlight
Usage: <main class> [-hilx] [-e=<environmentOption>] [-j=<projectOption>]
                    <searchString>
      <searchString>         The string to search for
  -e, --environment=<environmentOption>
                             The name of the lifecycle environment to use
  -h, --help                 Displays this help message and quits
  -i, --case-insensitive     Perform a case insensitive search
  -j, --project=<projectOption>
                             The name of the project to use
  -l, --print-locations      Print which locations are being looked at
  -v, --version              Print version information and exit
  -x, --regular-expression   The specified search string is a regular expression
```

\== Options

| Option          | Description                                         |
| --------------- | --------------------------------------------------- |
| \<searchString> | The string to search for                            |
| -e              | The name of the lifecycle environment to use        |
| -h              | Displays this help message and quits                |
| -i              | Perform a case insensitive search                   |
| -j              | The name of the project to use                      |
| -l              | Print which locations are being looked at           |
| -v              | Print version information and exit                  |
| -x              | The specified search string is a regular expression |

&#x20;

### Examples

Example command: search for the string 'json' (case insensitive) in the 'hop-samples' project.

* Windows

  ```highlight
  hop-search.bat -j samples -i switch-case
  ```

  Expected output:

  ```highlight
  C:\<YOUR_PATH>\hop>echo off
  ===[Environment Settings - hop-search.bat]===================================
  Java identified as "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java"
  HOP_OPTIONS=-Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows -DHOP_PLATFORM_RUNTIME=Search
  -DHOP_AUTO_CREATE_CONFIG=Y
  Command to start Hop will be:
  "C:\Program Files\Microsoft\jdk-11.0.17.8-hotspot\\bin\java" -classpath lib\core\*;lib\beam\*;lib\swt\win64\*
  -Djava.library.path=lib\core;lib\beam -Xmx2048m -DHOP_AUDIT_FOLDER=.\audit -DHOP_PLATFORM_OS=Windows
  -DHOP_PLATFORM_RUNTIME=Search -DHOP_AUTO_CREATE_CONFIG=Y org.apache.hop.config.HopConfig -j samples -i switch-case
  ===[Starting HopConfig]=========================================================
  Enabling project 'samples'
  Searching in project : samples
  Searching for [switch-case]
  Case sensitive? false
  Regular expression? false
  Searching in location : Project samples
  -----------------------------------------------------------------------------------
  file:///C:/<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : null(switch-case) : matching property value: switch-case
  file:///C:/<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : switch-case(switch-case) : matching property value: switch-case
  file:///C:/<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : switch-case(switch-case) : pipeline transform property : filePrefix
  file:///C:/<YOUR_PATH>/hop/config/projects/samples/transforms/switch-case-basic.hpl : null(switch-case-basic) : matching property value: switch-case-basic
  ```
* Linux, macOS

  ```highlight
  ./hop-search.sh -j samples -i switch-case
  ```

  Expected output:

  ```highlight
  Enabling project 'samples'
  Searching in project : samples
  Searching for [switch-case]
  Case sensitive? false
  Regular expression? false
  Searching in location : Project samples
  -----------------------------------------------------------------------------------
  file://<YOUR_PATH>/hop/config/projects/samples/transforms/switch-case-basic.hpl : null(switch-case-basic) : matching property value: switch-case-basic
  file://<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : null(switch-case) : matching property value: switch-case
  file://<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : switch-case(switch-case) : matching property value: switch-case
  file://<YOUR_PATH>/hop/config/projects/samples/beam/pipelines/switch-case.hpl : switch-case(switch-case) : pipeline transform property : filePrefix
  ```

Last updated 2025-09-04 18:20:58 +0200


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/index-1/hop-search.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
