bitte verwendet nur noch addressen die https beginnen! Siehe wiki https://wiki.mediacube.at/wiki/index.php?title=Repositories#ssh-_vs._https_repository_adressen

alle von MMT haben hier Zugriff. Du willst Deine Freunde von MMA auch dabei haben? Mail mit den usernamen an Brigitte Jellinek

Commit fe78d8fc authored by Christoph Mayr's avatar Christoph Mayr

removed unnecessary code left over from example

parent 0d1c0393
......@@ -19,8 +19,8 @@
<file leaf-file-name="index.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="17" lean-forward="false" selection-start-line="16" selection-start-column="17" selection-end-line="16" selection-end-column="17" />
<state relative-caret-position="420">
<caret line="28" column="0" lean-forward="true" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
<folding />
</state>
</provider>
......@@ -181,12 +181,12 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1528804284204</updated>
<workItem from="1528804285428" duration="11961000" />
<workItem from="1528804285428" duration="11984000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="11961000" />
<option name="totallyTimeSpent" value="11984000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="877" extended-state="0" />
......@@ -280,8 +280,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="17" lean-forward="false" selection-start-line="16" selection-start-column="17" selection-end-line="16" selection-end-column="17" />
<state relative-caret-position="420">
<caret line="28" column="0" lean-forward="true" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
<folding />
</state>
</provider>
......
......@@ -27,63 +27,6 @@ pokejson.forEach(function(element){
sendData(documents)
/*
// read file through fs readstream
const instream = fs.createReadStream('minijson.json') // simplewiki file has to be named 'simplewiki.json'
const outstream = new stream
const rl = readline.createInterface(instream, outstream)
// do this for every line in the stream
rl.on('line', function(line) {
// only every second line is interesting -> lines starting with index are not interesting
// extract only the relevant properties of the input JSON file
if (line.length < 4) {
return
}
else {
const lineJson = JSON.parse(line);
const outJson = {}
// write relevant properties to output JSON file
outJson["poke_id"] = lineJson.number
outJson["poke_txt_en"] = lineJson.name
outJson["gen_txt_en"] = lineJson.generation
outJson["about_txt_en"] = lineJson.about
outJson["types_features"] = lineJson.types
console.log(outJson);
//accumulate JSON objects before they are sent
accumData(outJson)
}
})
// send rest of Data when filestream is over
// otherwise the last <10k Objects are not sent
rl.on('close', function() {
sendData(documents)
documents = []
});
// accumulates JSON objects in array until 10k before they are sent
function accumData(postData) {
documents.push(postData)
if(documents.length == 10000){
// send array of JSON objects to solr server
console.log('sending')
sendData(documents)
documents = []
}
}
*/
// sends data to solr server
function sendData(postData){
var clientServerOptions = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment