> For the complete documentation index, see [llms.txt](https://documentation.efalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.efalia.com/api-reference/efalia-process-api/search.md).

# Search

## Search the Documents Index

> Search for documents localized label. Note that the default fields beginning with "Workey\_" are not included in this list.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Search","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"SearchResult":{"type":"object","properties":{"size":{"type":"integer"},"columns":{"type":"object","additionalProperties":{"type":"string"}},"hits":{"type":"array","items":{"type":"list"}}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/search":{"get":{"summary":"Search the Documents Index","description":"Search for documents localized label. Note that the default fields beginning with \"Workey_\" are not included in this list.","operationId":"Search","deprecated":false,"tags":["Search"],"parameters":[{"name":"query","in":"query","schema":{"type":"string"},"required":true,"description":"Lucene Query, for more information about the syntax of this query, refer to the official <a href=\"https://lucene.apache.org/core/2_9_4/queryparsersyntax.html\">Lucene Query Syntax</a> documentation."},{"name":"field","in":"query","schema":{"type":"string"},"required":false,"description":"(repeating) The ``names`` of the displayed fields. By default the fields Workey_Id, Workey_Doctype and Workey_Subject are displayed."},{"name":"sort","in":"query","schema":{"type":"string"},"required":false,"description":"(repeating) The ``names`` of the sorted fields. By default, the results are sorted on the relevance of the document."},{"name":"reverse","in":"query","schema":{"type":"boolean"},"required":false,"description":"If this option is set to true, and only ONE sort field, is specified, then the sort is reversed on this field."},{"name":"headers","in":"query","schema":{"type":"boolean"},"required":false,"description":"If this option is set to true the localized column names are included in a \"columns\" object."},{"name":"offset","in":"query","schema":{"type":"integer"},"required":false,"description":"If this option is set, a slice of results is fetched."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get List of Fields actually Indexed in Lucene

> Get the list of all the indexed fields, with their internal name and their localized label. Note that the default fields beginning with "Workey\_" are not included in this list.\
> \### Note\
> This operation is quite resource-intensive as it process all the fields in the Lucene index. The result of a call to this resource could benefit from being cached on the client side.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Search","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"SearchField":{"allOf":[{"$ref":"#/components/schemas/SearchItem"},{"type":"object","properties":{}}]},"SearchItem":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"}}},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/search/fields":{"get":{"summary":"Get List of Fields actually Indexed in Lucene","description":"Get the list of all the indexed fields, with their internal name and their localized label. Note that the default fields beginning with \"Workey_\" are not included in this list.\n### Note\nThis operation is quite resource-intensive as it process all the fields in the Lucene index. The result of a call to this resource could benefit from being cached on the client side.","operationId":"getFields","deprecated":false,"tags":["Search"],"parameters":[{"name":"lang","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchField"}}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```

## Get List of Fields By Processes and Document Types

> Get the list of all the indexable fields, with\
> &#x20;                        their internal name and their localized label.

```json
{"openapi":"3.0.0","info":{"title":"Efalia Process API","version":"6.36.1"},"tags":[{"name":"Search","description":""}],"servers":[{"url":"http://{hostname}/{workeyContext}/api/","variables":{"hostname":{"default":"localhost:8080","description":"Hostname and port of the Workey server"},"workeyContext":{"default":"workey","description":"Name of the running context of Workey"}}}],"security":[{"Basic":[]},{"Bearer":[]},{"ApiKey":[],"ApiKeyImpersonate":[]}],"components":{"securitySchemes":{"Basic":{"type":"http","scheme":"basic","description":"Value: Basic {encode username:password}"},"Bearer":{"type":"http","scheme":"bearer","description":"Value: Bearer {jwt}"},"ApiKey":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"API key defined in Process configuration."}},"schemas":{"SearchHelper":{"type":"object","properties":{"processes":{"type":"array","items":{"$ref":"#/components/schemas/SearchProcess"}},"fields":{"type":"object","additionalProperties":{"type":"string"}}}},"SearchProcess":{"allOf":[{"$ref":"#/components/schemas/SearchItem"},{"type":"object","properties":{"doctypes":{"type":"array","items":{"$ref":"#/components/schemas/SearchDocumentType"}}}}]},"SearchItem":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"}}},"SearchDocumentType":{"allOf":[{"$ref":"#/components/schemas/SearchItem"},{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/SearchField"}},"states":{"type":"array","items":{"$ref":"#/components/schemas/SearchItem"}}}}]},"SearchField":{"allOf":[{"$ref":"#/components/schemas/SearchItem"},{"type":"object","properties":{}}]},"RestMessage":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"boolean"},"message":{"type":"string"},"cause":{"$ref":"#/components/schemas/ErrorCause"}}},"ErrorCause":{"type":"object","properties":{"className":{"type":"string"},"method":{"type":"string"},"line":{"type":"integer"},"stackTrace":{"type":"object"}}}},"responses":{"WorkeyUnauthorized":{"description":"Unauthorized Workey access error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}},"WorkeyError":{"description":"Unexpected Workey Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMessage"}}}}}},"paths":{"/search/helper":{"get":{"summary":"Get List of Fields By Processes and Document Types","description":"Get the list of all the indexable fields, with\n                         their internal name and their localized label.","operationId":"getSearchHelper","deprecated":false,"tags":["Search"],"parameters":[{"name":"lang","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchHelper"}}}},"401":{"$ref":"#/components/responses/WorkeyUnauthorized"},"555":{"$ref":"#/components/responses/WorkeyError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.efalia.com/api-reference/efalia-process-api/search.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
