adityamparikh opened a new pull request, #206:
URL: https://github.com/apache/solr-mcp/pull/206

   ### Summary
   Markdown front matter is YAML, but its values did not come from a YAML 
parser: the commonmark front-matter extension reads the block line by line, and 
`MarkdownDocumentCreator` added a hand-rolled splitter for flow sequences (`[a, 
b]`). A quoted title containing a comma or a colon, a quoted list element, or a 
nested mapping came out wrong or was lost.
   
   The block is now sliced out verbatim using commonmark's source spans and 
handed to SnakeYAML, which Spring Boot already ships. Implicit type resolution 
is switched off, so every scalar stays the text as written (`2026-01-01` is not 
turned into a Date, `8.4` not into a Double), exactly as before; Solr's schema 
guessing types it. Sequences become multi-valued fields, nested mappings 
flatten with underscores (`ratings_imdb`), nulls are skipped. The flow-sequence 
splitter is deleted.
   
   ### What changed
   - `MarkdownDocumentCreator`: parser built with `includeSourceSpans(BLOCKS)`; 
`addFrontMatterFields` loads the block with SnakeYAML's `SafeConstructor` and a 
resolver with no implicit tags; ~30 lines of custom parsing removed, ~25 lines 
of library wiring added.
   - `MarkdownDocumentCreatorTest` (plain JUnit): quoted scalars with 
delimiters, flow and block sequences, nested mapping, typed-looking scalars 
kept as text, invalid YAML reported, no-front-matter document unchanged.
   - `MarkdownIndexingTest` (existing, Spring) passes unchanged.
   
   Independent of #202, #203 and #205; any merge order.
   
   ### Verification
   - `./gradlew build` on Java 25: green.
   - `./gradlew nativeTest -Pnative` on GraalVM CE 25.0.2: green (SnakeYAML's 
`SafeConstructor` builds only JDK collections and strings).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01CiUHyyXLTo9ATdgg8eRFZJ
   


-- 
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]

Reply via email to