adityamparikh opened a new pull request, #165: URL: https://github.com/apache/solr-mcp/pull/165
## Motivation `FieldNameSanitizer` rewrites incoming field names for Solr compatibility (`User-Name` → `user_name`, `product.price` → `product_price`). This is the right behavior — but it's invisible: the indexing tools return only a count, so an MCP client that just indexed `User-Name` proceeds to search `User-Name`, gets zero matches, and has no way to discover why. The information arrives too late (or never) via `get-schema`, because nothing suggests the names changed. The tool *response* is the perfect delivery point: it reaches the client at exactly the moment the renames happen. ## Changes - `index-json-documents`, `index-csv-documents`, `index-xml-documents` responses now append the distinct field names as indexed, e.g. `... Indexed field names (input names are sanitized for Solr compatibility): id, product_price, user_name`. Capped at 50 names with the remainder counted, so wide documents don't bloat the response. - Each of the three tool descriptions now states that field/column/element names are sanitized and that the response lists the final names. - New integration test indexing hostile field names and asserting the response reports `user_name`/`product_price`, not the input forms. `./gradlew build` passes (unit + Testcontainers integration tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
