go-duck-cli 1.2.1 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -72,7 +72,7 @@ GO-DUCK has officially reached the **410% Achievement Status**, evolving from a
72
72
  * **Distributed Saga Consistency**: Integrated **Transactional Outbox** pattern and background workers in every silo to guarantee eventual consistency across the federation.
73
73
  * **Zero-Trust Identity Registry**: Decoupled mapping layer ensuring physical database names and internal IDs never leak to the client.
74
74
  * **Universal Storage Mesh**: Dynamic Multi-Provider Registry allowing hot-swapping at runtime via `?provider=` queries, alongside Distributed Cross-Scan endpoints to auto-locate files across AWS, GCS, SFTP, and GitHub lakes.
75
- * **Spring-style Elasticsearch Search**: Real-time sync for entities marked with `@Searchable`, supporting fuzzy matching and complex queries.
75
+ * **Spring-style Elasticsearch Search**: Real-time sync for entities marked with `@Searchable`, supporting native `query_string` syntax (wildcards like `*`, booleans, ranges, and fuzzy matching).
76
76
  * **SaaS Quota Engine**: Redis-backed API bandwidth tracking with dynamic, hierarchical limits (User vs. Role mapping).
77
77
  * **Resilience Layer**: Sony/Gobreaker Integration + Zero-Trust Distributed Redis Rate Limiter.
78
78
  * **Comprehensive GDL Schema Evolution**: Detects structural deltas intelligently and automatically generates Goose SQL for dropped entities (`DROP TABLE`), dropped fields (`DROP COLUMN`), and altered fields (`ALTER TYPE`, constraints) to keep databases in absolute sync.
@@ -156,10 +156,9 @@ func ExecuteSearch(ctx context.Context, entityName string, queryStr string, cfg
156
156
  } else {
157
157
  query = map[string]interface{}{
158
158
  "query": map[string]interface{}{
159
- "multi_match": map[string]interface{}{
160
- "query": queryStr,
161
- "fields": []string{"*"},
162
- "fuzziness": "AUTO",
159
+ "query_string": map[string]interface{}{
160
+ "query": queryStr,
161
+ "analyze_wildcard": true,
163
162
  },
164
163
  },
165
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "go-duck-cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.11",
4
4
  "description": "The Ultimate Evolutionary Go Microservice Scaffolder.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -81,6 +81,17 @@ DELETE /api/{{#if entities.length}}{{toLowerCase entities.[0].name}}s{{else}}ent
81
81
  -H "Authorization: Bearer YOUR_JWT" \
82
82
  -H "X-Tenant-ID: tenant_1"</code></pre>
83
83
  <p class="text-sm text-gray-500 mt-2">Supported operators: <code>eq, neq, gt, gte, lt, lte, like, ilike</code></p>
84
+
85
+ <h3 class="font-semibold mb-2 mt-6">Elasticsearch Global Search (Spring-style):</h3>
86
+ <p class="mb-2">For entities marked with <code>@Searchable</code>, use the native Elasticsearch endpoint for advanced queries (wildcards, booleans, and ranges).</p>
87
+ <pre><code class="language-bash">curl -G "http://localhost:{{serverPort}}/api/search/{{#if entities.length}}{{toLowerCase entities.[0].name}}{{else}}entity{{/if}}" \
88
+ --data-urlencode "q=name:John AND age:>18" \
89
+ -H "Authorization: Bearer YOUR_JWT"</code></pre>
90
+ <ul class="text-sm text-gray-500 mt-2 list-disc pl-5">
91
+ <li><strong>Wildcards:</strong> <code>q=name*</code> (matches "name15", "name_abc")</li>
92
+ <li><strong>Boolean Logic:</strong> <code>q=status:PUBLISHED AND (author:John OR author:Jane)</code></li>
93
+ <li><strong>Ranges:</strong> <code>q=age:[18 TO 30]</code> or <code>q=created_at:>2023-01-01</code></li>
94
+ </ul>
84
95
  </section>
85
96
 
86
97
  <!-- Audit & Metering -->