Re: javascript form data save to XML in server side

2014-10-22 Thread Dan Davis
I always, always have a web application running that accepts the JavaScript AJAX call and then forwards it on to the Apache Solr request handler. Even if you don't control the web application, and can only add JavaScript, you can put up a API oriented webapp somewhere that only protects Solr for a

Re: javascript form data save to XML in server side

2014-10-20 Thread LongY
thank you very much. Alex. You reply is very informative and I really appreciate it. I hope I would be able to help others in this forum like you are in the future. -- View this message in context: http://lucene.472066.n3.nabble.com/javascript-form-data-save-to-XML-in-server-side-tp4165025p4165

Re: javascript form data save to XML in server side

2014-10-20 Thread Alexandre Rafalovitch
Most of the javascript frameworks (AngularJS, etc) allow to post information back to the server. If you use gmail or yahoo mail or anything else, it's a javascript that lets you send a message. So, if you completely trust your users, you can just have Javascript and Solr and nothing else. Though

Re: javascript form data save to XML in server side

2014-10-20 Thread LongY
The solr users are trustworthy and it's only for internal use. The purpose of this form is to allow user to directly input data to be further indexed by solr. I am interested in this sentence from your reply which is "Or you can run Javascript to post back to Solr". Please bear with me if I ask ver

Re: javascript form data save to XML in server side

2014-10-20 Thread Alexandre Rafalovitch
In the most recent Solr, there is a "Documents" page, next after the DataImportHandler page. That's got several different ways to add a document. Regards, Alex. Personal: http://www.outerthoughts.com/ and @arafalov Solr resources and newsletter: http://www.solr-start.com/ and @solrstart Solr po

Re: javascript form data save to XML in server side

2014-10-20 Thread LongY
I guess the admin UI for adding docs you mentioned is Data Import Handler. If I understand your reply correctly, the idea is to post the javascript form data from the webpage to /update/extract handler. Thank you for shedding some light. -- View this message in context: http://lucene.472066.n

Re: javascript form data save to XML in server side

2014-10-20 Thread Alexandre Rafalovitch
There is a couple of issues with what you are saying here: 1) You should not be exposing Solr directly to the internet. They would be able to delete all your records and do other damage. /browse endpoint is there to show-off what Solr can do, not to be used in production 2) Solr is Java, it does no

Re: javascript form data save to XML in server side

2014-10-20 Thread Erik Hatcher
One possibility is to send to one of Solr's /update handlers from your page. It won't be straightforward unless you were POSTing a file to /update/extract, but it would be possible for a little bit of JavaScript onSubmit to format the data amenable to Solr. I've not done this myself but it'd