Skip to main content

Elasticsearch Query Assistant

Elasticsearch is a distributed search and analytics engine designed to store, search, and analyze large volumes of data very quickly. It is commonly used for full-text search, log analysis, and real-time analytics. The Docwize Elasticsearch Query Assistant allows users to build and test Elasticsearch queries against indexed documents in their Docwize database. This feature enables users to perform detailed searches, troubleshoot search behaviour, or develop custom queries.

The 'Elasticsearch Query Assistant' is accessed by the 'Elasticsearch' icon in the Search homepage.

workflow-builder

'Elasticsearch' Icon

Query Assistant Interface

The Docwize Elasticsearch Query Assistant combines an AI-assisted query builder, a JSON query editor, and a results preview section.

workflow-builder

Query Assistant Interface

The Query Assistant interface contains three main sections:

SectionDescription
Query AssistantAI-assisted interface used to generate Elasticsearch queries from natural language prompts.
Elasticsearch Query (JSON)Editor where queries can be viewed and modified in JSON format.
Results PreviewDisplays documents returned by the query.

Query Assistant Section

The Query Assistant panel allows users to describe a search request using natural language. The system generates an Elasticsearch query based on the natural language, which is inserted into the JSON editor.

workflow-builder

Query Assistant Section

FieldDescription
New chatStarts a new query assistant session.
Chat historyDisplays previous assistant conversations for the current user.
ModelDropdown used to select the AI model that generates Elasticsearch queries.
Prompt input 'Ask about ES queries'Field where users enter a natural language request describing the search they want to perform.
SendExecutes the prompt and generates an Elasticsearch query.
Paste image from clipboardAllows users to paste an image to provide additional context to the assistant.

Elasticsearch Query (JSON) Section

The Elasticsearch Query (JSON) panel displays the active query in Elasticsearch format. Users can manually edit or paste queries in this editor.

workflow-builder

Elasticsearch Query Section

FieldDescription
Query editorEditable code area where users can view and modify the Elasticsearch query.
SearchExecutes the query against the Elasticsearch index.
ClearClears the current query from the editor.
Simple SearchSwitches to the simple search interface for building queries without writing JSON.
Ctrl + EnterKeyboard shortcut used to execute the current query.

Results Preview Section

The Results Preview section displays documents returned by the query.

workflow-builder

Results Preview Section

FieldDescription
Hit CountThe number of matching documents returned by the query.
Document ResultsIndividual documents matching the query.
Search BarAllows filtering within the preview results.

For more details regaring Results Preview features, please see the Document Grid user notes.

How to Run an Elasticsearch Query

StepAction
1Navigate to the Elasticsearch Query Assistant.
2Enter a search request in the Prompt input field.
3Click Send to generate an Elasticsearch query.
4Review or edit the generated query in the Elasticsearch Query (JSON) editor.
5Run the query by pressing Ctrl + Enter or clicking Search.
6View the returned documents in the Results Preview section.

Overview: Running an Elasticsearch Query