Hi —

I looking for a way to send many JSON files to a Classic Index Schema (not 
managed) using something.
I created a schema.xml and a solrconfig.xml that allows me to post JSON using 
the Solr Admin document 
Using <schemaFactory class="ClassicIndexSchemaFactory"/>  in solrconfig.xml, so 
it’s not managed schema.

Post my JSON (below) to the Solr Admin post a document—> 
http://localhost:8983/solr/#/poc2/documents 
<http://localhost:8983/solr/#/poc2/documents> WORKS ! (creates a field / value 
for each of the tuples below)
So this assumes the schema.xml is valid and working I get a multiple valued 
field.

however when I use the bin/post tool or curl POST doing this (they both produce 
only id, all, _src_, and _version_). The _src_ has my original document below.

Anyone have a suggestion on the proper use of curl or the Solr post tool 
properly (Data Handler?) to post a directory of JSON?
Do I need to adjust my solrconfig.xml to make something work. 

Thank you

Here is a sample curl

curl -X POST -H 'Content-Type: application/json' 
'http://localhost:8983/solr/poc2/update/json/docs' 
<http://localhost:8983/solr/poc2/update/json/docs'> --data-binary '             
   
{                                                                               
                                                   
 "eid": "1-s2.0-S073510971104383X",                                             
                                                   
 "contentsubtype": "PGL",                                                       
                                                   
 "issn": "07351097",                                                            
                                                                                
       
 "all": "JACC (Journal of the American College of Cardiology) 2011 ACCF/AHA 
Guideline for the Diagnosis and Treatment of Hypertrop\
hic Cardiomyopathy: Executive Summary Recommendations for HCM Stress 
Testing—Recommendations 2.4 Class IIa 1 Treadmill exercise te\
sting is reasonable to determine functional capacity and response to therapy in 
patients with HCM. (Level of Evidence: C) 2 Treadm\
ill testing with monitoring of an ECG and blood pressure is reasonable for SCD 
risk stratification in patients with HCM ( 69–71 ).\
 (Level of Evidence: B) 3 In patients with HCM who do not have a resting peak 
instantaneous gradient of greater than or equal to 5\
0 mm Hg, exercise echocardiography is reasonable for the detection and 
quantification of exercise-induced dynamic LVOT obstruction\
 ( 67,70–72 ). (Level of Evidence: B)",                                         
                                                   
                                                                                
                      
}’

here is a sample Solr post: ~/solr-6.0.0/bin/post -c poc2 .  (done in the 
directory of JSON or it’s parent) — all docs are visited and sent to the Solr 
index (only getting the id, _src_, all, and _version_ fields.

I appreciate any comments on what might need adjustment.

I will see about reverse engineering the POST of the Solr Admin to discover the 
post of the JSON (it has to be different in some manner).

Thank you
Matt

Reply via email to