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 987082c9 authored by Christoph Mayr's avatar Christoph Mayr

search uses dismax query now

parent c3e460bd
......@@ -2,11 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="03703853-d797-498e-a74c-c726d51baed3" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/script.js" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/search.html" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.js" afterPath="$PROJECT_DIR$/index.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package-lock.json" afterPath="$PROJECT_DIR$/package-lock.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/search.js" afterPath="$PROJECT_DIR$/search.js" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
......@@ -24,8 +19,8 @@
<file leaf-file-name="search.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/search.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="640">
<caret line="92" column="5" lean-forward="true" selection-start-line="92" selection-start-column="5" selection-end-line="92" selection-end-column="5" />
<state relative-caret-position="840">
<caret line="56" column="21" lean-forward="false" selection-start-line="56" selection-start-column="21" selection-end-line="56" selection-end-column="21" />
<folding />
</state>
</provider>
......@@ -180,12 +175,12 @@
<option name="presentableId" value="Default" />
<updated>1528804284204</updated>
<workItem from="1528804285428" duration="15571000" />
<workItem from="1528882827788" duration="3908000" />
<workItem from="1528882827788" duration="5451000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="19479000" />
<option name="totallyTimeSpent" value="21022000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="877" extended-state="0" />
......@@ -261,9 +256,9 @@
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<marker date="1528975429622" expanded="true" signature="460:4886" ph="{...}" />
<marker date="1528975429622" expanded="true" signature="2816449:2817098" ph="[...]" />
<marker date="1528975429622" expanded="true" signature="2816482:2817064" ph="{...}" />
<marker date="1528988893726" expanded="true" signature="460:4886" ph="{...}" />
<marker date="1528988893726" expanded="true" signature="2816449:2817098" ph="[...]" />
<marker date="1528988893726" expanded="true" signature="2816482:2817064" ph="{...}" />
</folding>
</state>
</provider>
......@@ -311,8 +306,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/search.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="640">
<caret line="92" column="5" lean-forward="true" selection-start-line="92" selection-start-column="5" selection-end-line="92" selection-end-column="5" />
<state relative-caret-position="840">
<caret line="56" column="21" lean-forward="false" selection-start-line="56" selection-start-column="21" selection-end-line="56" selection-end-column="21" />
<folding />
</state>
</provider>
......
......@@ -4,11 +4,11 @@ const client = solr.createClient('127.0.0.1', '8983', 'gettingstarted', '/solr')
// const startQuery = `q=id:3`;
// // DixMax query
// // DisMax query
// var query = client.createQuery()
// .q('laptop')
// .q('water')
// .dismax()
// .qf({title_t : 0.2 , description_t : 3.3})
// .qf({poke_txt_en : 0.2 , about_txt_en : 3.3})
// .mm(2)
// .start(0)
// .rows(10);
......@@ -51,7 +51,15 @@ function sendNameQuery(q){
if(q.length==0){
document.getElementById("results").innerHTML = "Bitte gib' einen Suchbegriff ein!"
}else{
var query = "q=about_txt_en:(" + q +")&rows=100" //rows ist nötig, sonst nur 10 results
//var query = "q=about_txt_en:("+ q +")&rows=100" //rows ist nötig, sonst nur 10 results
var query = client.createQuery()
.q(q)
.dismax()
.qf({poke_txt_en : 0.2 , about_txt_en : 3.3})
.mm(2)
.start(0)
.rows(10);
console.log(query);
client.search(query,function(err,obj){
......@@ -72,6 +80,7 @@ function sendNameQuery(q){
"<li>Name: <strong>" + entry.poke_txt_en + "</strong></li>" +
"<li>Gen: " + entry.gen_txt_en + "</li>" +
"<li>MaxHP: " + entry.maxHP_txt_en + "</li>" +
"<li>MaxCP: " + entry.maxCP_txt_en + "</li>" +
"<li>Types:</li>" +
`<ul id='${entry.id}'></ul>`;
......
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