Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb272a85

Browse files
authored
Fixes for816891f for secondary filter values
1 parent03f9bbe commitb272a85

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

‎src/components/secondary-filter-values.js‎

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -806,39 +806,52 @@ secondayFilterValues = Vue.component('secondary-filters', {
806806
" SERVICE wikibase:label {\n"+
807807
" bd:serviceParam wikibase:language \""+lang+"\".\n"+
808808
" ?value rdfs:label ?valueLabel\n"+
809-
" }\n";
809+
" }\n"+
810+
"}\n";
810811
parentFilterString="SERVICE <"+centralSPARQLService+"> {\n"+
811812
parentFilterString+
812813
"\n}\n";
813814
}else{
814815
labelClause=" SERVICE wikibase:label { bd:serviceParam wikibase:language \""+lang+"\". }\n";
815816
}
816817

817-
varsparqlQuery="SELECT ?value ?valueLabel ?count\n"+
818-
"WITH {\n"+
819-
"SELECT ?temp (count(?temp) as ?tempCount) WHERE {\n"+
820-
vm.classSelector+
821-
"?item wdt:"+vm.currentFilter.value+" ?temp.\n"+
818+
varsparqlQuery="SELECT ?value ?valueLabel ?count\n";
819+
820+
if(centralSPARQLService){
821+
sparqlQuery+="WITH {\n"+
822+
"SELECT ?temp (count(?temp) as ?tempCount) WHERE {\n";
823+
}else{
824+
sparqlQuery+="WHERE {\n"+
825+
"{\n"+
826+
"SELECT ?value (COUNT(?value) AS ?count) WHERE {\n";
827+
}
828+
829+
sparqlQuery+=vm.classSelector+
830+
"{\n?item wdt:"+vm.currentFilter.value+" ?temp .\n"+
831+
"?temp wdt:"+vm.secondaryFilter.value+" ?value\n}\n"+
822832
filterString+
823833
filterRanges+
824834
filterQuantities+
825-
noValueString+
826-
"\n} GROUP BY ?temp\n"+
827-
"} AS %local\n"+
828-
"WHERE {\n"+
829-
"{\n"+
830-
"SELECT ?value (sum(?tempCount) as ?count) WHERE {\n"+
831-
"INCLUDE %local\n"+
832-
parentFilterString+
835+
noValueString;
836+
837+
if(centralSPARQLService){
838+
sparqlQuery+="\n} GROUP BY ?temp\n"+
839+
"} AS %local\n"+
840+
"WHERE {\n"+
841+
"{\n"+
842+
"SELECT ?value (sum(?tempCount) as ?count) WHERE {\n"+
843+
"INCLUDE %local\n";
844+
}
845+
846+
sparqlQuery+=parentFilterString+
833847
"}\n"+
834848
"GROUP BY ?value\n"+
835849
"ORDER BY DESC (?count)\n"+
836850
"LIMIT 1000\n"+
837851
"}\n"+
838852
labelClause+
839853
"}\n"+
840-
"}\n"+
841-
"ORDER BY DESC (?count)\n";
854+
"ORDER BY DESC (?count)";
842855
vm.query=queryServiceWebsiteURL+encodeURIComponent(sparqlQuery);
843856
varfullUrl=sparqlEndpoint+encodeURIComponent(sparqlQuery);
844857
axios.get(fullUrl)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp