|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +title: Search Engine |
| 4 | +description: Configure and manage Search Engine instances in Viglet Turing ES. |
| 5 | +--- |
| 6 | + |
| 7 | +# Search Engine |
| 8 | + |
| 9 | +The **Search Engine** page (`/admin/se/instance`) manages the search backends that power Semantic Navigation Sites. It is accessible from the **Enterprise Search** section of the sidebar. |
| 10 | + |
| 11 | +Each **Search Engine instance** is a configured connection to a search backend. Semantic Navigation Sites bind to a specific instance when their cores (collections) are created. Turing ES supports three backends via a plugin architecture: **Apache Solr** (recommended), **Apache Lucene** (embedded), and **Elasticsearch**. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Instance Listing |
| 16 | + |
| 17 | +The page displays all configured instances as a grid of cards (title and description). Use the **"New"** button to add an instance. When no instances exist, a blank state guides you to create the first one. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Create / Edit Form |
| 22 | + |
| 23 | +### General Information |
| 24 | + |
| 25 | +| Field | Required | Description | |
| 26 | +|---|---|---| |
| 27 | +| **Title** | ✅ | Display name for this instance — shown in SN Site dropdowns | |
| 28 | +| **Description** | | Free-text notes about this instance | |
| 29 | + |
| 30 | +### Connection Settings |
| 31 | + |
| 32 | +| Field | Required | Description | |
| 33 | +|---|---|---| |
| 34 | +| **Vendor** | ✅ | Backend type: `SOLR`, `LUCENE`, or `ES` | |
| 35 | +| **Endpoint URL** | ✅ | Connection URL for the backend service | |
| 36 | + |
| 37 | +Default endpoint URLs per vendor: |
| 38 | + |
| 39 | +| Vendor | Default Endpoint URL | |
| 40 | +|---|---| |
| 41 | +| **SOLR** (Apache Solr) | `http://localhost:8983/solr` | |
| 42 | +| **LUCENE** (embedded Apache Lucene) | `/data/turing/lucene` | |
| 43 | +| **ES** (Elasticsearch) | `http://localhost:9200` | |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Instance Detail Pages |
| 48 | + |
| 49 | +After creating an instance, its detail page exposes three navigation sections. |
| 50 | + |
| 51 | +### Settings |
| 52 | + |
| 53 | +Editing form for all fields listed above, plus a **Delete instance** button. An instance cannot be deleted if any SN Site cores are still using it. |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +### Cores (Collections) |
| 58 | + |
| 59 | +Manages the search indices — called **cores** in Solr terminology — within this search engine instance. Each Semantic Navigation Site locale maps to one core. |
| 60 | + |
| 61 | +#### Core Listing |
| 62 | + |
| 63 | +The list shows all cores found in the connected backend: |
| 64 | + |
| 65 | +| Column | Description | |
| 66 | +|---|---| |
| 67 | +| **Name** | Core identifier (e.g., `my-site_en_US`) | |
| 68 | +| **Documents** | Number of indexed documents (`numDocs`) reported by the engine | |
| 69 | +| **Sites** | Badges showing each SN Site and locale using this core, with a country flag for quick recognition | |
| 70 | + |
| 71 | +Cores are grouped by locale pattern: `{base}_{lang}_{COUNTRY}` (e.g., `product-docs_pt_BR`). A **search/filter** field at the top narrows the list by core name. |
| 72 | + |
| 73 | +#### Core Actions |
| 74 | + |
| 75 | +| Action | Description | |
| 76 | +|---|---| |
| 77 | +| **Delete core** | Permanently removes the core and all its indexed data. **Blocked** if the core is in use by any SN Site — the UI shows which sites and locales are preventing deletion. | |
| 78 | +| **Clear documents** | Erases all indexed documents from the core without removing the core itself. Useful for a clean re-index without reconfiguring site associations. | |
| 79 | + |
| 80 | +#### Create a New Core |
| 81 | + |
| 82 | +| Field | Required | Description | |
| 83 | +|---|---|---| |
| 84 | +| **Name / Name Prefix** | ✅ | Core name or prefix | |
| 85 | +| **Locale** | ✅ | Language and country (e.g., `en_US`, `pt_BR`) | |
| 86 | +| **Append locale to name** | | Toggle — when enabled, the locale is automatically appended to the prefix, generating the canonical name (e.g., prefix `my-site` + locale `en_US` → `my-site_en_US`) | |
| 87 | + |
| 88 | +A **name preview** shows the final core name as you type, before saving. |
| 89 | + |
| 90 | +:::tip Naming convention |
| 91 | +Use the `{site-name}_{lang}_{COUNTRY}` pattern consistently. This makes it easy to identify which site and locale each core belongs to when browsing multiple instances. |
| 92 | +::: |
| 93 | + |
| 94 | +--- |
| 95 | + |
| 96 | +### System Information |
| 97 | + |
| 98 | +Live monitoring panel for the connected backend: |
| 99 | + |
| 100 | +| Item | Description | |
| 101 | +|---|---| |
| 102 | +| **Status badge** | `UP` (green) or `DOWN` (red) — real-time connectivity check | |
| 103 | +| **Engine version** | Solr or Elasticsearch version string | |
| 104 | +| **Lucene version** | Underlying Lucene library version | |
| 105 | +| **Operating system** | OS name and version of the engine host | |
| 106 | +| **Java version** | JVM version running the search engine | |
| 107 | +| **JVM memory** | Heap usage reported by the engine | |
| 108 | +| **Other properties** | Additional dynamic properties returned by the engine's status API | |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Plugin Architecture |
| 113 | + |
| 114 | +Turing ES uses a **plugin architecture** to support multiple search backends with a unified interface. The active plugin is resolved at runtime based on the vendor configured per instance. |
| 115 | + |
| 116 | +```mermaid |
| 117 | +graph TD |
| 118 | + FACTORY["TurSearchEnginePluginFactory\n(resolves by vendor, fallback → Solr)"] |
| 119 | + SOLR["TurSolrSearchEnginePlugin"] |
| 120 | + ES["TurElasticsearchSearchEnginePlugin"] |
| 121 | + LUCENE["TurLuceneSearchEnginePlugin"] |
| 122 | +
|
| 123 | + FACTORY --> SOLR |
| 124 | + FACTORY --> ES |
| 125 | + FACTORY --> LUCENE |
| 126 | +``` |
| 127 | + |
| 128 | +The `TurSearchEnginePlugin` interface defines all backend operations in four categories: |
| 129 | + |
| 130 | +**Search** |
| 131 | + |
| 132 | +| Method | Description | |
| 133 | +|---|---| |
| 134 | +| `retrieveSearchResults()` | Execute a full-text query and return results with facets | |
| 135 | +| `retrieveFacetResults()` | Return facet counts for a query | |
| 136 | + |
| 137 | +**Index management** |
| 138 | + |
| 139 | +| Method | Description | |
| 140 | +|---|---| |
| 141 | +| `createIndex()` | Create a new core / index | |
| 142 | +| `deleteIndex()` | Delete a core / index | |
| 143 | +| `clearIndex()` | Remove all documents from a core without deleting it | |
| 144 | +| `listIndexes()` | List all cores / indices on the backend | |
| 145 | + |
| 146 | +**Schema management** |
| 147 | + |
| 148 | +| Method | Description | |
| 149 | +|---|---| |
| 150 | +| `addOrUpdateField()` | Add or update a field definition in the schema | |
| 151 | +| `deleteField()` | Remove a field from the schema | |
| 152 | +| `fieldExists()` | Check whether a field exists in the schema | |
| 153 | + |
| 154 | +**Documents & monitoring** |
| 155 | + |
| 156 | +| Method | Description | |
| 157 | +|---|---| |
| 158 | +| `indexDocument()` | Index a single document | |
| 159 | +| `deIndex()` | Remove a document from the index | |
| 160 | +| `commit()` | Flush pending writes (for backends that require explicit commits) | |
| 161 | +| `getDocumentTotal()` | Return the total number of indexed documents | |
| 162 | +| `getSystemInfo()` | Return backend version, OS, JVM, and memory information | |
| 163 | + |
| 164 | +:::info Fallback behaviour |
| 165 | +If a vendor is unrecognised or unavailable, `TurSearchEnginePluginFactory` falls back to the **Solr** plugin. Apache Solr is the primary supported backend with the most complete feature set. |
| 166 | +::: |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +## Protections |
| 171 | + |
| 172 | +| Scenario | Behaviour | |
| 173 | +|---|---| |
| 174 | +| **Delete core in use** | Blocked — the UI displays a list of SN Sites and locales currently using the core | |
| 175 | +| **Delete instance in use** | Should be avoided — removing an instance with active sites will break indexing and search for those sites | |
| 176 | + |
| 177 | +Repository-level **caching** is enabled for search engine instances to avoid repeated database reads during high-frequency searches. |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## Related Pages |
| 182 | + |
| 183 | +| Page | Description | |
| 184 | +|---|---| |
| 185 | +| [Administration Guide](./administration-guide.md) | Full console reference | |
| 186 | +| [Semantic Navigation Concepts](./sn-concepts.md) | How SN Sites use cores and search engines | |
| 187 | +| [Architecture Overview](./architecture-overview.md) | Solr, Elasticsearch, and Lucene in the system architecture | |
| 188 | +| [Configuration Reference](./configuration-reference.md#solr) | Solr and Elasticsearch timeout settings in `application.yaml` | |
| 189 | + |
| 190 | +--- |
| 191 | + |
| 192 | +*Previous: [Administration Guide](./administration-guide.md)* |
0 commit comments