maven-indexer-mcp 1.0.0 → 1.0.1
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/build/indexer.js +5 -1
- package/package.json +1 -1
package/build/indexer.js
CHANGED
|
@@ -265,7 +265,11 @@ export class Indexer {
|
|
|
265
265
|
// Use FTS for smart matching
|
|
266
266
|
// If pattern has no spaces, we assume it's a prefix or exact match query
|
|
267
267
|
// "String" -> match "String" in simple_name or class_name
|
|
268
|
-
const
|
|
268
|
+
const escapedPattern = classNamePattern.replace(/"/g, '""');
|
|
269
|
+
const safeQuery = classNamePattern.replace(/[^a-zA-Z0-9]/g, ' ').trim();
|
|
270
|
+
const query = safeQuery.length > 0
|
|
271
|
+
? `"${escapedPattern}"* OR ${safeQuery}`
|
|
272
|
+
: `"${escapedPattern}"*`;
|
|
269
273
|
try {
|
|
270
274
|
const rows = db.prepare(`
|
|
271
275
|
SELECT c.class_name, c.simple_name, a.id, a.group_id, a.artifact_id, a.version, a.abspath, a.has_source
|