Commit 888a470f authored by Mersi Stafa's avatar Mersi Stafa
Browse files

final changes

parent cfb77325
......@@ -2,9 +2,7 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="6b1b1f9f-7082-4de1-8be3-72ae0b0290cb" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PAE_GruppeXX_final_report_doc.doc" afterPath="$PROJECT_DIR$/PAE_GruppeXX_final_report_doc.doc" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/dummy_text.txt" afterPath="$PROJECT_DIR$/dummy_text.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/service/examples/example_call.txt" afterPath="$PROJECT_DIR$/service/examples/example_call.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/PAE_GruppeEM5_final_report_doc.doc" afterPath="$PROJECT_DIR$/PAE_GruppeEM5_final_report_doc.doc" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/service/routes/main.js" afterPath="$PROJECT_DIR$/service/routes/main.js" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
......@@ -19,21 +17,21 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="main.js" pinned="false" current-in-tab="false">
<file leaf-file-name="main.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/service/routes/main.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="263" column="0" lean-forward="true" selection-start-line="263" selection-start-column="0" selection-end-line="263" selection-end-column="0" />
<state relative-caret-position="40">
<caret line="207" column="16" lean-forward="false" selection-start-line="207" selection-start-column="16" selection-end-line="207" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="dummy_text.txt" pinned="false" current-in-tab="true">
<file leaf-file-name="dummy_text.txt" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dummy_text.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="7" selection-end-column="14" />
<state relative-caret-position="120">
<caret line="6" column="23" lean-forward="true" selection-start-line="6" selection-start-column="23" selection-end-line="6" selection-end-column="23" />
<folding />
</state>
</provider>
......@@ -61,9 +59,9 @@
<option value="$PROJECT_DIR$/frontend/script.js" />
<option value="$PROJECT_DIR$/frontend/index.html" />
<option value="$PROJECT_DIR$/service/examples/example_call.txt" />
<option value="$PROJECT_DIR$/service/routes/main.js" />
<option value="$PROJECT_DIR$/service/package.json" />
<option value="$PROJECT_DIR$/dummy_text.txt" />
<option value="$PROJECT_DIR$/service/routes/main.js" />
</list>
</option>
</component>
......@@ -83,7 +81,7 @@
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/service/node_modules" />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1382" />
......@@ -211,25 +209,25 @@
<updated>1513709369582</updated>
<workItem from="1513709371086" duration="5478000" />
<workItem from="1515261435809" duration="41000" />
<workItem from="1516443722943" duration="27355000" />
<workItem from="1516443722943" duration="28761000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="32874000" />
<option name="totallyTimeSpent" value="34280000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
<frame x="-8" y="-8" width="1382" height="744" extended-state="7" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19180088" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.12884334" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.50292826" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27531645" sideWeight="0.49707174" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30379745" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.036392406" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
......@@ -385,18 +383,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/service/routes/main.js">
<entry file="file://$PROJECT_DIR$/dummy_text.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="263" column="0" lean-forward="true" selection-start-line="263" selection-start-column="0" selection-end-line="263" selection-end-column="0" />
<state relative-caret-position="120">
<caret line="6" column="23" lean-forward="true" selection-start-line="6" selection-start-column="23" selection-end-line="6" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dummy_text.txt">
<entry file="file://$PROJECT_DIR$/service/routes/main.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="7" selection-end-column="14" />
<state relative-caret-position="40">
<caret line="207" column="16" lean-forward="false" selection-start-line="207" selection-start-column="16" selection-end-line="207" selection-end-column="16" />
<folding />
</state>
</provider>
......
......@@ -95,18 +95,11 @@ module.exports = function (router) {
}
};
/**
*
*
*/
let client = new elasticsearch.Client({
host: 'elastic-mis.cs.univie.ac.at:9200',
log: 'trace'
});
/**
*
*/
client.ping({
// ping usually has a 3000ms timeout
requestTimeout: 1000
......@@ -182,11 +175,6 @@ module.exports = function (router) {
});
});
/**
* Search request when typing in a question with Is + AspectName(adj)
* where the EntityDirectAspect is true and as response is an answer
* that is Yes/No
*/
router.post('/search', function (req, res) {
// let sentencesForm = splitSentences(req.body.q);
......@@ -217,8 +205,7 @@ module.exports = function (router) {
if (JSON.parse(body).EntitySet.length === 0) {
let formData = querystring.stringify({lang: 'eng', q: "Test " + req.body.q});
request({
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
......@@ -268,7 +255,7 @@ module.exports = function (router) {
});
} else {
// who is pretty mersi
// who is (pretty) mersi
JSON.parse(body).EntitySet.map(entity => {
if (entity.Aspects.length > 0) {
......@@ -285,6 +272,7 @@ module.exports = function (router) {
});
} else {
// who is mersi
arrayMatch.push({"match": {"Name": entity.Name}});
......@@ -341,7 +329,6 @@ module.exports = function (router) {
};
/**
*
* removes duplicate names or adj from the answer list
......
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