New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

solr-xml-to-jsonl

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solr-xml-to-jsonl

A CLI utility to convert a solr data file to a simple JSONL file

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
1
Weekly downloads
 
Created
Source

solr-xml-to-jsonl

This is a simple CLI utility to convert data in SOLR XML format to a JSONL file.

Usage:

npx solr-xml-to-jsonl <path/to/input_solr_data.xml> <path/to/output.jsonl>

This is the expected format of input_solr_data.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<add>
    <docs>
        <doc>
            <field name="product_name">Water Bottle</field>
            <field name="price">1.99</field>
            <field name="description">A bottle of water</field>
            <field name="in_stock">true</field>
            <field name="category">Water</field>
            <field name="category">Bottles</field>
        </doc>
        <doc>
            <field name="product_name">Lemonade</field>
            <field name="price">2.99</field>
            <field name="description">A bottle of lemonade</field>
            <field name="in_stock">true</field>
            <field name="category">Lemonade</field>
            <field name="category">Bottles</field>
        </doc>
    </docs>
</add>

After running this command, the output JSONL will be in this format:

{"product_name":"Water Bottle","price":1.99,"description":"A bottle of water","in_stock":true,"category":["Water","Bottles"]}
{"product_name":"Lemonade","price":2.99,"description":"A bottle of lemonade","in_stock":true,"category":["Lemonade","Bottles"]}

FAQs

Package last updated on 21 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc