This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-mcp.git
The following commit(s) were added to refs/heads/main by this push:
new a1639ae feat(search): document eDisMax local params in search tool
description (#161)
a1639ae is described below
commit a1639ae32d8dfde93a1752ce895c18f8acb310ad
Author: Aditya Parikh <[email protected]>
AuthorDate: Tue Aug 18 17:10:27 2026 -0400
feat(search): document eDisMax local params in search tool description
(#161)
The search tool exposes only q/fq/facets/sort/paging. MCP clients that
know Solr look for defType/qf/mm parameters, find none, and fall back
to plain term queries. Document the local-params bridge
({!edismax qf='...' mm=...}) directly in the tool description, and
clarify that filters belong in fq so Solr can cache and reuse them.
Signed-off-by: adityamparikh <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
---
.../java/org/apache/solr/mcp/server/search/SearchService.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/solr/mcp/server/search/SearchService.java
b/src/main/java/org/apache/solr/mcp/server/search/SearchService.java
index a4813c3..1235362 100644
--- a/src/main/java/org/apache/solr/mcp/server/search/SearchService.java
+++ b/src/main/java/org/apache/solr/mcp/server/search/SearchService.java
@@ -229,6 +229,10 @@ public class SearchService {
annotations = @McpTool.McpAnnotations(readOnlyHint =
true),
description = """
Search specified Solr collection with query, optional
filters, facets, sorting, and pagination.
+ The q parameter accepts Lucene query syntax. There are
no separate defType/qf/mm parameters:
+ to use eDisMax features (multi-field search,
minimum-match, boosts), embed Solr local params
+ in q, e.g. {!edismax qf='name author' mm=2}george
martin.
+ Put filters in fq (filterQueries) instead of q so Solr
can cache and reuse them.
Note that solr has dynamic fields where name of field
in schema may end with suffixes
_s: Represents a string field, used for exact string
matching.
_i: Represents an integer field.
@@ -256,9 +260,12 @@ public class SearchService {
// @formatter:on
public SearchResponse search(@McpToolParam(description = "Solr
collection to query") String collection,
@McpToolParam(
- description = "Solr q parameter. If
none specified defaults to \"*:*\"",
+ description = "Solr q parameter. Lucene
syntax; supports local params such as"
+ + " {!edismax qf='name
author'}. If none specified defaults to \"*:*\"",
required = false) String query,
- @McpToolParam(description = "Solr fq parameter",
required = false) List<String> filterQueries,
+ @McpToolParam(
+ description = "Solr fq parameter: list
of filter queries, one filter per entry",
+ required = false) List<String>
filterQueries,
@McpToolParam(description = "Solr facet fields",
required = false) List<String> facetFields,
@McpToolParam(description = "Solr sort parameter",
required = false) List<Map<String, String>> sortClauses,
@McpToolParam(description = "Starting offset for
pagination", required = false) Integer start,