Compare commits
10 commits
04d19b3ed7
...
7e86865090
Author | SHA1 | Date | |
---|---|---|---|
7e86865090 | |||
273dc81799 | |||
859f8a1432 | |||
3c3ebfd35f | |||
f6eeed939b | |||
4fac5c232c | |||
b9758f6f24 | |||
5af5f10545 | |||
9b833ee888 | |||
23f45e6eea |
45 changed files with 11549 additions and 434 deletions
|
@ -1,12 +1,5 @@
|
|||
# xbib Contextual Query Language Compiler for Java
|
||||
|
||||
image:https://api.travis-ci.org/xbib/cql.svg[title="Build status", link="https://travis-ci.org/xbib/cql/"]
|
||||
image:https://img.shields.io/sonar/http/nemo.sonarqube.com/org.xbib%3Acql/coverage.svg?style=flat-square[title="Coverage", link="https://sonarqube.com/dashboard/index?id=org.xbib%3Acql"]
|
||||
image:https://maven-badges.herokuapp.com/maven-central/org.xbib/cql/badge.svg[title="Maven Central", link="http://search.maven.org/#search%7Cga%7C1%7Cxbib%20cql"]
|
||||
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[title="Apache License 2.0", link="https://opensource.org/licenses/Apache-2.0"]
|
||||
image:https://img.shields.io/twitter/url/https/twitter.com/xbib.svg?style=social&label=Follow%20%40xbib[title="Twitter", link="https://twitter.com/xbib"]
|
||||
|
||||
|
||||
CQL, the Contextual Query Language, is a formal language for representing queries to information retrieval systems.
|
||||
Its objective is to combine simplicity with expressiveness, to accommodate the range of complexity from
|
||||
very simple queries to very complex. CQL queries are intended to be human readable and writable, intuitive,
|
||||
|
@ -19,9 +12,9 @@ It also support extensive query options, filter queries and faceting, with bread
|
|||
More about CQL can be found under
|
||||
link:http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/os/part5-cql/searchRetrieve-v1.0-os-part5-cql.html[the searchRetrieve 1.0 CQL specification].
|
||||
|
||||
== License
|
||||
## License
|
||||
|
||||
Copyright (C) 2012 Jörg Prante
|
||||
Copyright (C) 2012-2022 Jörg Prante
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
34
build.gradle
34
build.gradle
|
@ -1,10 +1,17 @@
|
|||
|
||||
plugins {
|
||||
id "de.marcphilipp.nexus-publish" version "0.4.0"
|
||||
id "io.codearte.nexus-staging" version "0.21.1"
|
||||
id "checkstyle"
|
||||
id "pmd"
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1"
|
||||
//id "com.github.spotbugs" version "6.0.0-beta.3"
|
||||
id "org.cyclonedx.bom" version "1.7.4"
|
||||
id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0"
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "${project.property('gradle.wrapper.version')}"
|
||||
gradleVersion = libs.versions.gradle.get()
|
||||
distributionType = Wrapper.DistributionType.ALL
|
||||
}
|
||||
|
||||
|
@ -13,10 +20,10 @@ ext {
|
|||
name = 'cql'
|
||||
description = 'Contextual Query Language compiler for Java'
|
||||
inceptionYear = '2016'
|
||||
url = 'https://github.com/' + user + '/' + name
|
||||
scmUrl = 'https://github.com/' + user + '/' + name
|
||||
scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
|
||||
scmDeveloperConnection = 'scm:git:ssh://git@github.com:' + user + '/' + name + '.git'
|
||||
url = 'https://xbib.org/' + user + '/' + name
|
||||
scmUrl = 'https://xbib.org/' + user + '/' + name
|
||||
scmConnection = 'scm:git:git://xbib.org/' + user + '/' + name + '.git'
|
||||
scmDeveloperConnection = 'scm:git:ssh://forgejo@xbib.org:' + user + '/' + name + '.git'
|
||||
issueManagementSystem = 'Github'
|
||||
issueManagementUrl = ext.scmUrl + '/issues'
|
||||
licenseName = 'The Apache License, Version 2.0'
|
||||
|
@ -24,11 +31,14 @@ ext {
|
|||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java-library'
|
||||
apply from: rootProject.file('gradle/ide/idea.gradle')
|
||||
//apply from: rootProject.file('gradle/ide/idea.gradle')
|
||||
apply from: rootProject.file('gradle/repositories/maven.gradle')
|
||||
apply from: rootProject.file('gradle/compile/java.gradle')
|
||||
apply from: rootProject.file('gradle/test/junit5.gradle')
|
||||
apply from: rootProject.file('gradle/repositories/maven.gradle')
|
||||
apply from: rootProject.file('gradle/publishing/publication.gradle')
|
||||
apply from: rootProject.file('gradle/publish/maven.gradle')
|
||||
apply from: rootProject.file('gradle/quality/checkstyle.gradle')
|
||||
apply from: rootProject.file('gradle/quality/pmd.gradle')
|
||||
//apply from: rootProject.file('gradle/quality/spotbugs.gradle')
|
||||
}
|
||||
apply from: rootProject.file('gradle/publishing/sonatype.gradle')
|
||||
apply from: rootProject.file('gradle/publish/sonatype.gradle')
|
||||
apply from: rootProject.file('gradle/publish/forgejo.gradle')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id 'org.xbib.gradle.plugin.jflex' version '1.4.0'
|
||||
id 'org.xbib.gradle.plugin.jacc' version '1.4.0'
|
||||
id 'org.xbib.gradle.plugin.jflex' version '3.0.0'
|
||||
id 'org.xbib.gradle.plugin.jacc' version '3.0.0'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
@ -10,3 +10,7 @@ sourceSets {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named('sourcesJar').configure {
|
||||
dependsOn('generateJflex', 'generateJacc')
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ package org.xbib.cql;
|
|||
*/
|
||||
public abstract class AbstractNode implements Node {
|
||||
|
||||
public AbstractNode() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to accept this node by a visitor.
|
||||
*
|
||||
|
|
|
@ -9,8 +9,12 @@ import org.xbib.cql.QueryOption;
|
|||
public class Option<V> implements QueryOption<V>, Comparable<Option<V>> {
|
||||
|
||||
private String name;
|
||||
|
||||
private V value;
|
||||
|
||||
public Option() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
|
|
|
@ -13,6 +13,9 @@ public class FacetBreadcrumbTrail<V> extends TreeSet<Facet<V>> {
|
|||
|
||||
private static final long serialVersionUID = 6268000598739081048L;
|
||||
|
||||
public FacetBreadcrumbTrail() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toCQL();
|
||||
|
|
|
@ -15,6 +15,9 @@ public class OptionBreadcrumbTrail<V> extends TreeSet<Option<V>> {
|
|||
|
||||
private static final long serialVersionUID = -3426025113354994279L;
|
||||
|
||||
public OptionBreadcrumbTrail() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return toCQL();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dependencies {
|
||||
api project(':cql-common')
|
||||
implementation "org.xbib:datastructures-json-tiny:${project.property('xbib-datastructures.version')}"
|
||||
implementation libs.datastructures.json
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@ module org.xbib.cql.elasticsearch {
|
|||
exports org.xbib.cql.elasticsearch.model;
|
||||
requires transitive org.xbib.cql;
|
||||
requires org.xbib.datastructures.api;
|
||||
requires org.xbib.datastructures.json.tiny;
|
||||
requires transitive org.xbib.datastructures.json.tiny;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
|
||||
private final ElasticsearchQueryModel model;
|
||||
|
||||
private final ElasticsearchFilterGenerator filterGenerator;
|
||||
private final ElasticsearchFilterGenerator elasticsearchFilterGenerator;
|
||||
|
||||
private final Stack<Node> stack;
|
||||
|
||||
|
@ -62,30 +62,39 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
|
||||
private final QueryGenerator queryGen;
|
||||
|
||||
private FilterGenerator filterGen;
|
||||
private final FacetsGenerator facetGen;
|
||||
|
||||
private FacetsGenerator facetGen;
|
||||
|
||||
private SortGenerator sortGen;
|
||||
private final SortGenerator sortGen;
|
||||
|
||||
private final String globalField;
|
||||
|
||||
private FilterGenerator filterGen;
|
||||
|
||||
public ElasticsearchQueryGenerator(String globalField) throws IOException {
|
||||
this(globalField, false);
|
||||
}
|
||||
|
||||
public ElasticsearchQueryGenerator(String globalField, boolean phraseBoostHint) throws IOException {
|
||||
this(globalField, new SourceGenerator(), new QueryGenerator(), new FacetsGenerator(), new SortGenerator(), phraseBoostHint);
|
||||
}
|
||||
|
||||
public ElasticsearchQueryGenerator(String globalField,
|
||||
SourceGenerator sourceGen,
|
||||
QueryGenerator queryGen,
|
||||
FacetsGenerator facetGen,
|
||||
SortGenerator sortGen,
|
||||
boolean phraseBoostHint) throws IOException {
|
||||
this.globalField = globalField;
|
||||
this.from = 0;
|
||||
this.size = 10;
|
||||
this.model = new ElasticsearchQueryModel();
|
||||
this.filterGenerator = new ElasticsearchFilterGenerator(globalField, model);
|
||||
this.elasticsearchFilterGenerator = new ElasticsearchFilterGenerator(globalField, model);
|
||||
this.stack = new Stack<>();
|
||||
this.sourceGen = new SourceGenerator();
|
||||
this.queryGen = new QueryGenerator();
|
||||
this.filterGen = new FilterGenerator();
|
||||
this.facetGen = new FacetsGenerator();
|
||||
this.sortGen = new SortGenerator();
|
||||
}
|
||||
|
||||
public ElasticsearchQueryModel getModel() {
|
||||
return model;
|
||||
this.sourceGen = sourceGen != null ? sourceGen : new SourceGenerator();
|
||||
this.queryGen = queryGen != null ? queryGen : new QueryGenerator();
|
||||
this.facetGen = facetGen != null ? facetGen : new FacetsGenerator();
|
||||
this.sortGen = sortGen != null ? sortGen : new SortGenerator();
|
||||
this.queryGen.setPhraseBoostHint(phraseBoostHint);
|
||||
}
|
||||
|
||||
public ElasticsearchQueryGenerator setFrom(int from) {
|
||||
|
@ -109,17 +118,17 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
public ElasticsearchQueryGenerator filter(String filter) {
|
||||
CQLParser parser = new CQLParser(filter);
|
||||
parser.parse();
|
||||
parser.getCQLQuery().accept(filterGenerator);
|
||||
parser.getCQLQuery().accept(elasticsearchFilterGenerator);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ElasticsearchQueryGenerator andfilter(String filterKey, Collection<String> filterValues) {
|
||||
filterGenerator.addAndFilter(filterKey, filterValues);
|
||||
elasticsearchFilterGenerator.addAndFilter(filterKey, filterValues);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ElasticsearchQueryGenerator orfilter(String filterKey, Collection<String> filterValues) {
|
||||
filterGenerator.addOrFilter(filterKey, filterValues);
|
||||
elasticsearchFilterGenerator.addOrFilter(filterKey, filterValues);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -132,14 +141,27 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
return this;
|
||||
}
|
||||
|
||||
public ElasticsearchQueryModel getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
public String getQueryResult() {
|
||||
return queryGen.getResult().build();
|
||||
}
|
||||
|
||||
public String getFilterResult() {
|
||||
return filterGen != null ? filterGen.getResult().build() : null;
|
||||
}
|
||||
|
||||
public String getFacetResult() {
|
||||
return facetGen.getResult().build();
|
||||
}
|
||||
|
||||
public String getSortRequest() {
|
||||
return sortGen.getResult().build();
|
||||
}
|
||||
|
||||
public String getSourceResult() {
|
||||
return sourceGen.getResult().build();
|
||||
}
|
||||
|
@ -157,7 +179,7 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
}
|
||||
if (model.hasFilter()) {
|
||||
queryGen.startFiltered();
|
||||
} else if (filterGenerator.getResult().build().length() > 0) {
|
||||
} else if (elasticsearchFilterGenerator.getResult().build().length() > 0) {
|
||||
queryGen.startFiltered();
|
||||
}
|
||||
Node querynode = stack.pop();
|
||||
|
@ -175,9 +197,9 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
filterGen.visit(model.getFilterExpression());
|
||||
filterGen.endFilter();
|
||||
queryGen.end();
|
||||
} else if (filterGenerator.getResult().build().length() > 0) {
|
||||
} else if (elasticsearchFilterGenerator.getResult().build().length() > 0) {
|
||||
queryGen.end();
|
||||
JsonBuilder contentBuilder = filterGenerator.getResult();
|
||||
JsonBuilder contentBuilder = elasticsearchFilterGenerator.getResult();
|
||||
queryGen.getResult(). copy(contentBuilder);
|
||||
queryGen.endFiltered();
|
||||
}
|
||||
|
@ -185,12 +207,11 @@ public class ElasticsearchQueryGenerator implements Visitor {
|
|||
queryGen.endBoost();
|
||||
}
|
||||
if (model.hasFacets()) {
|
||||
facetGen = new FacetsGenerator();
|
||||
facetGen.visit(model.getFacetExpression());
|
||||
}
|
||||
queryGen.end();
|
||||
if (model.getSort() != null) {
|
||||
sortGen = new SortGenerator();
|
||||
//sortGen = new SortGenerator();
|
||||
sortGen.start();
|
||||
sortGen.visit(model.getSort());
|
||||
sortGen.end();
|
||||
|
|
|
@ -17,12 +17,10 @@ import java.util.Map;
|
|||
*/
|
||||
public class FacetsGenerator implements Visitor {
|
||||
|
||||
private int facetlength = 10;
|
||||
|
||||
private final JsonBuilder builder;
|
||||
|
||||
public FacetsGenerator() throws IOException {
|
||||
this.builder = new JsonBuilder();
|
||||
this.builder = JsonBuilder.builder();
|
||||
}
|
||||
|
||||
public void start() throws IOException {
|
||||
|
@ -93,19 +91,18 @@ public class FacetsGenerator implements Visitor {
|
|||
break;
|
||||
}
|
||||
default:
|
||||
throw new IllegalArgumentException(
|
||||
"unable to translate operator while building elasticsearch facet: " + op);
|
||||
throw new IllegalArgumentException("unable to translate operator while building elasticsearch facet: " + op);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new SyntaxException("internal error while building elasticsearch query", e);
|
||||
}
|
||||
}
|
||||
|
||||
public FacetsGenerator facet(String facetLimit, String facetSort) throws IOException {
|
||||
public void facet(String facetLimit, String facetSort) throws IOException {
|
||||
if (facetLimit == null) {
|
||||
return this;
|
||||
return;
|
||||
}
|
||||
Map<String, Integer> facetMap = parseFacet(facetLimit);
|
||||
Map<String, Integer> facetMap = parseFacet(facetLimit, 10);
|
||||
String[] sortSpec = facetSort != null ? facetSort.split(",") : new String[]{"recordCount", "descending"};
|
||||
String order = "_count";
|
||||
String dir = "desc";
|
||||
|
@ -143,12 +140,11 @@ public class FacetsGenerator implements Visitor {
|
|||
builder.endMap();
|
||||
}
|
||||
builder.endMap();
|
||||
return this;
|
||||
}
|
||||
|
||||
private Map<String, Integer> parseFacet(String spec) {
|
||||
Map<String, Integer> m = new HashMap<String, Integer>();
|
||||
m.put("*", facetlength);
|
||||
private Map<String, Integer> parseFacet(String spec, int defaultFacetLimit) {
|
||||
Map<String, Integer> m = new HashMap<>();
|
||||
m.put("*", defaultFacetLimit);
|
||||
if (spec == null || spec.length() == 0) {
|
||||
return m;
|
||||
}
|
||||
|
@ -156,10 +152,10 @@ public class FacetsGenerator implements Visitor {
|
|||
for (String param : params) {
|
||||
int pos = param.indexOf(':');
|
||||
if (pos > 0) {
|
||||
int n = parseInt(param.substring(0, pos), facetlength);
|
||||
int n = parseInt(param.substring(0, pos), defaultFacetLimit);
|
||||
m.put(param.substring(pos + 1), n);
|
||||
} else if (param.length() > 0) {
|
||||
int n = parseInt(param, facetlength);
|
||||
int n = parseInt(param, defaultFacetLimit);
|
||||
m.put("*", n);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class FilterGenerator implements Visitor {
|
|||
private final JsonBuilder builder;
|
||||
|
||||
public FilterGenerator() {
|
||||
this.builder = new JsonBuilder();
|
||||
this.builder = JsonBuilder.builder();
|
||||
}
|
||||
|
||||
public FilterGenerator(QueryGenerator queryGenerator) throws IOException {
|
||||
|
|
|
@ -19,8 +19,14 @@ public class QueryGenerator implements Visitor {
|
|||
|
||||
private final JsonBuilder builder;
|
||||
|
||||
private boolean phraseBoostHint;
|
||||
|
||||
public QueryGenerator() {
|
||||
this.builder = new JsonBuilder();
|
||||
this.builder = JsonBuilder.builder();
|
||||
}
|
||||
|
||||
public void setPhraseBoostHint(boolean phraseBoostHint) {
|
||||
this.phraseBoostHint = phraseBoostHint;
|
||||
}
|
||||
|
||||
public void start() throws IOException {
|
||||
|
@ -154,27 +160,37 @@ public class QueryGenerator implements Visitor {
|
|||
.endMap()
|
||||
.endMap();
|
||||
} else {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
if (phraseBoostHint) {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
} else {
|
||||
// without phrase boost hint
|
||||
builder.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -211,27 +227,36 @@ public class QueryGenerator implements Visitor {
|
|||
.field(field, value)
|
||||
.endMap();
|
||||
} else {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
if (phraseBoostHint) {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.field("default_operator", "and")
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
} else {
|
||||
builder.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -243,25 +268,34 @@ public class QueryGenerator implements Visitor {
|
|||
.field(field, value)
|
||||
.endMap();
|
||||
} else {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
if (phraseBoostHint) {
|
||||
// with phrase boost
|
||||
builder.beginMap("bool")
|
||||
.beginCollection("should")
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.endMap()
|
||||
.endMap()
|
||||
.beginMap()
|
||||
.beginMap("simple_query_string")
|
||||
.field("query", "\"" + value + "\"")
|
||||
.field("fields", Collections.singletonList(field + "^2"))
|
||||
.endMap()
|
||||
.endMap()
|
||||
.endCollection()
|
||||
.field("minimum_should_match", "1")
|
||||
.endMap();
|
||||
} else {
|
||||
builder.beginMap("simple_query_string")
|
||||
.field("query", value)
|
||||
.field("fields", Collections.singletonList(field))
|
||||
.field("analyze_wildcard", true)
|
||||
.field("default_operator", "and")
|
||||
.endMap();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class SortGenerator implements Visitor {
|
|||
private final Stack<Modifier> modifiers;
|
||||
|
||||
public SortGenerator() {
|
||||
this.builder = new JsonBuilder();
|
||||
this.builder = JsonBuilder.builder();
|
||||
this.modifiers = new Stack<>();
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class SortGenerator implements Visitor {
|
|||
builder.beginMap()
|
||||
.buildKey(node.getName())
|
||||
.beginMap()
|
||||
.field("unmapped_type", "string")
|
||||
.field("ignore_unmapped", "true")
|
||||
.field("missing", "_last")
|
||||
.endMap()
|
||||
.endMap();
|
||||
|
@ -75,7 +75,7 @@ public class SortGenerator implements Visitor {
|
|||
}
|
||||
}
|
||||
}
|
||||
builder.field("unmapped_type", "string");
|
||||
builder.field("ignore_unmapped", "true");
|
||||
builder.field("missing", "_last");
|
||||
builder.endMap();
|
||||
builder.endMap();
|
||||
|
|
|
@ -9,7 +9,7 @@ public class SourceGenerator {
|
|||
private final JsonBuilder builder;
|
||||
|
||||
public SourceGenerator() throws IOException {
|
||||
this.builder = new JsonBuilder();
|
||||
this.builder = JsonBuilder.builder();
|
||||
}
|
||||
|
||||
public void build(QueryGenerator query) throws IOException {
|
||||
|
|
|
@ -20,7 +20,7 @@ class ElasticsearchQueryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void testSimpleTermFilter() throws Exception {
|
||||
void testSimpleTermFilter() {
|
||||
String cql = "Jörg";
|
||||
CQLParser parser = new CQLParser(cql);
|
||||
parser.parse();
|
||||
|
@ -31,7 +31,7 @@ class ElasticsearchQueryTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void testFieldTermFilter() throws Exception {
|
||||
void testFieldTermFilter() {
|
||||
String cql = "dc.type = electronic";
|
||||
CQLParser parser = new CQLParser(cql);
|
||||
parser.parse();
|
||||
|
@ -78,7 +78,7 @@ class ElasticsearchQueryTest {
|
|||
generator.setBoostParams("boost", "log2p", 2.0f, "sum");
|
||||
parser.getCQLQuery().accept(generator);
|
||||
String json = generator.getSourceResult();
|
||||
assertEquals("{\"from\":0,\"size\":10,\"query\":{\"function_score\":{\"field_value_factor\":{\"field\":\"boost\",\"modifier\":\"log2p\",\"factor\":2.0},\"boost_mode\":\"sum\",\"query\":{\"bool\":{\"should\":[{\"simple_query_string\":{\"query\":\"Jörg\",\"fields\":[\"cql.allIndexes\"],\"analyze_wildcard\":true,\"default_operator\":\"and\"}},{\"simple_query_string\":{\"query\":\"\\\"Jörg\\\"\",\"fields\":[\"cql.allIndexes^2\"],\"default_operator\":\"and\"}}],\"minimum_should_match\":\"1\"}}}}}",
|
||||
assertEquals("{\"from\":0,\"size\":10,\"query\":{\"function_score\":{\"field_value_factor\":{\"field\":\"boost\",\"modifier\":\"log2p\",\"factor\":2.0},\"boost_mode\":\"sum\",\"query\":{\"simple_query_string\":{\"query\":\"Jörg\",\"fields\":[\"cql.allIndexes\"],\"analyze_wildcard\":true,\"default_operator\":\"and\"}}}}}",
|
||||
json);
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,19 @@ class ElasticsearchQueryTest {
|
|||
ElasticsearchQueryGenerator generator = new ElasticsearchQueryGenerator("cql.allIndexes");
|
||||
parser.getCQLQuery().accept(generator);
|
||||
String json = generator.getSourceResult();
|
||||
assertEquals("{\"from\":0,\"size\":10,\"query\":{\"bool\":{\"should\":[{\"simple_query_string\":{\"query\":\"book*\",\"fields\":[\"dc.format\"],\"analyze_wildcard\":true,\"default_operator\":\"and\"}},{\"simple_query_string\":{\"query\":\"\\\"book*\\\"\",\"fields\":[\"dc.format^2\"],\"default_operator\":\"and\"}}],\"minimum_should_match\":\"1\"}}}",
|
||||
assertEquals("{\"from\":0,\"size\":10,\"query\":{\"simple_query_string\":{\"query\":\"book*\",\"fields\":[\"dc.format\"],\"analyze_wildcard\":true,\"default_operator\":\"and\"}}}",
|
||||
json);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testPhrase() throws Exception {
|
||||
String cql = "bib.title = \"Summer fever\"";
|
||||
CQLParser parser = new CQLParser(cql);
|
||||
parser.parse();
|
||||
ElasticsearchQueryGenerator generator = new ElasticsearchQueryGenerator("cql.allIndexes");
|
||||
parser.getCQLQuery().accept(generator);
|
||||
String json = generator.getSourceResult();
|
||||
assertEquals("{\"from\":0,\"size\":10,\"query\":{\"simple_query_string\":{\"query\":\"\\\"Summer fever\\\"\",\"fields\":[\"bib.title\"],\"analyze_wildcard\":true,\"default_operator\":\"and\"}}}",
|
||||
json);
|
||||
}
|
||||
|
||||
|
@ -106,7 +118,9 @@ class ElasticsearchQueryTest {
|
|||
try {
|
||||
int pos = line.indexOf('|');
|
||||
if (pos > 0) {
|
||||
validate(line.substring(0, pos), line.substring(pos + 1));
|
||||
String cql = line.substring(0, pos);
|
||||
String expected = line.substring(pos + 1);
|
||||
validate(cql, expected);
|
||||
ok++;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -129,6 +143,6 @@ class ElasticsearchQueryTest {
|
|||
parser.getCQLQuery().accept(generator);
|
||||
String elasticsearchQuery = generator.getSourceResult();
|
||||
assertEquals(expected, elasticsearchQuery);
|
||||
//System.out.println(cql + "|" + elasticsearchQuery);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,126 +1,128 @@
|
|||
id = 8a666b7e-6597-3cfb-b478-313cc3c25011|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"8a666b7e-6597-3cfb-b478-313cc3c25011","fields":["id"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"8a666b7e-6597-3cfb-b478-313cc3c25011\"","fields":["id^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
unix|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
financing|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"Christine Wolfinger"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"Christine Wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"Christine Wolfinger\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"der die das"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"der die das","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"der die das\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
1234|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"1234","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"1234\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"1234"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"1234","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"1234\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"unix AND wolfinger"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix AND wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix AND wolfinger\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"to be or not to be"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"to be or not to be","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"to be or not to be\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"not macht erfinderisch"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"not macht erfinderisch","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"not macht erfinderisch\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"to be or not to be"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"to be or not to be","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"to be or not to be\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
unix$|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix$","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix$\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"^linux"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
finan*|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"finan*","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"finan*\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
finan?|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"finan?","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"finan?\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
finan*ng|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"finan*ng","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"finan*ng\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
finan?ier?ng|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"finan?ier?ng","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"finan?ier?ng\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
title = "duck"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"duck\"","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"duck\"\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
title = "Dinosaur Systematics"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"Dinosaur Systematics\"","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"Dinosaur Systematics\"\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
id = 8a666b7e-6597-3cfb-b478-313cc3c25011|{"from":0,"size":10,"query":{"simple_query_string":{"query":"8a666b7e-6597-3cfb-b478-313cc3c25011","fields":["id"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
unix|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
financing|{"from":0,"size":10,"query":{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"Christine Wolfinger"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"Christine Wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"der die das"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"der die das","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
1234|{"from":0,"size":10,"query":{"simple_query_string":{"query":"1234","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"1234"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"1234","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"unix AND wolfinger"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix AND wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"to be or not to be"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"to be or not to be","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"not macht erfinderisch"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"not macht erfinderisch","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"to be or not to be"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"to be or not to be","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
unix$|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix$","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"^linux"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
finan*|{"from":0,"size":10,"query":{"simple_query_string":{"query":"finan*","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
finan?|{"from":0,"size":10,"query":{"simple_query_string":{"query":"finan?","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
finan*ng|{"from":0,"size":10,"query":{"simple_query_string":{"query":"finan*ng","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
finan?ier?ng|{"from":0,"size":10,"query":{"simple_query_string":{"query":"finan?ier?ng","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title = "duck"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"duck\"","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
bib.title adj "Summer fever"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"Summer fever","fields":["bib.title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
bib.title adj "\"Summer fever phrase\""|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"Summer fever phrase\"","fields":["bib.title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title = "Dinosaur Systematics"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"Dinosaur Systematics\"","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title <> linux|{"from":0,"size":10,"query":{"bool":{"must_not":{"simple_query_string":{"query":"linux","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}}}
|
||||
cql.resultSetId = HT000011990|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"HT000011990","fields":["cql.resultSetId"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"HT000011990\"","fields":["cql.resultSetId^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
cql.allRecords = 2|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"2","fields":["cql.allRecords"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2\"","fields":["cql.allRecords^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
cql.allRecords = 1 NOT title = fish|{"from":0,"size":10,"query":{"bool":{"must_not":[{"bool":{"should":[{"simple_query_string":{"query":"1","fields":["cql.allRecords"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"1\"","fields":["cql.allRecords^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"fish","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"fish\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
title any "unix linux"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix linux","fields":["title"],"analyze_wildcard":true}},{"simple_query_string":{"query":"\"unix linux\"","fields":["title^2"]}}],"minimum_should_match":"1"}}}
|
||||
title all "unix linux"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix linux","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix linux\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
title all "unix 'linux' test"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix 'linux' test","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix 'linux' test\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
title all "linux \"pinguin's best friend\" unix"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"linux \"pinguin's best friend\" unix","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux \"pinguin's best friend\" unix\"","fields":["title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
cql.resultSetId = HT000011990|{"from":0,"size":10,"query":{"simple_query_string":{"query":"HT000011990","fields":["cql.resultSetId"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
cql.allRecords = 2|{"from":0,"size":10,"query":{"simple_query_string":{"query":"2","fields":["cql.allRecords"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
cql.allRecords = 1 NOT title = fish|{"from":0,"size":10,"query":{"bool":{"must_not":[{"simple_query_string":{"query":"1","fields":["cql.allRecords"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"fish","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
title any "unix linux"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix linux","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title all "unix linux"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix linux","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title all "unix 'linux' test"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix 'linux' test","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
title all "linux \"pinguin's best friend\" unix"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"linux \"pinguin's best friend\" unix","fields":["title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.title adj "lord of the rings"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"lord of the rings","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
anywhere = "linux unix \"grundkurs für einsteiger\""|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"linux unix \\\"grundkurs für einsteiger\\\"\"","fields":["anywhere"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"linux unix \\\"grundkurs für einsteiger\\\"\"\"","fields":["anywhere^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.date=2003|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"2003","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2003\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.date="2003"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"2003\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"2003\"\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.creator=smith|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"smith","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"smith\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.title=financing|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.subject=financing|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["dc.subject"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["dc.subject^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
"feathered dinosaur" and (yixian or jehol)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"feathered dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"feathered dinosaur\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"yixian","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"yixian\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"jehol","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"jehol\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
(a or b) and (c or d)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"a","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"a\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"b","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"b\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"c","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"c\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"d","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"d\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
unix AND wolfinger|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
"keine angst" AND unix|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"keine angst","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"keine angst\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title=unix or wolfinger|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
(dc.title = unix or dc.date = 2003) and ( dc.creator = wolfinger and dc.creator = christine or dc.creator = maier )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"2003","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2003\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"wolfinger","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"christine","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"christine\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"maier","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"maier\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
financing AND success|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
financing OR monetary|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"monetary\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
financing NOT success|{"from":0,"size":10,"query":{"bool":{"must_not":[{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
(financing AND monetary) OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"monetary\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
financing AND (monetary OR success)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"monetary\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
"financing constraints" OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing constraints\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
"financing constraints" NOT model|{"from":0,"size":10,"query":{"bool":{"must_not":[{"bool":{"should":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing constraints\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"model\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
("financing constraints" AND model) OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing constraints\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"model\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
"financing constraints" AND (model OR success)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"financing constraints\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"model\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"success\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
dinosaur or bird|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dinosaur\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"bird\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dino and "eiszeit"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"dino","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dino\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"eiszeit","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"eiszeit\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dinosaur not reptile|{"from":0,"size":10,"query":{"bool":{"must_not":[{"bool":{"should":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dinosaur\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"reptile","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"reptile\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "christine" )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"linux\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"christine\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"christine\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
date = 2007-09-30 or date = "2007-09-30T12:34:56"|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"2007-09-30","fields":["date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2007-09-30\"","fields":["date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"2007-09-30T12:34:56\"","fields":["date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"2007-09-30T12:34:56\"\"","fields":["date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dinosaur and bird or dinobird|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dinosaur\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"bird\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"dinobird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dinobird\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
(bird or dinosaur) and (feathers or scales)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"bird\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"dinosaur\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"feathers","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"feathers\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"scales","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"scales\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
linux and creator = wolfinger|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"wolfinger","fields":["creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title=linux and dc.title = unix|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"linux","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title = unix and dc.date = 2000|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"2000","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2000\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title = "unix" and dc.creator = "wolfinger"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title = "unix" or dc.creator = "wolfinger"|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.title = "unix" and ( dc.creator = "wolfinger" or dc.creator = "meyer" )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"meyer\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
dc.title = "unix" and dc.creator = "wolfinger" and dc.creator = "christine"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"\"christine\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"christine\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"linux\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"meyer\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
dc.title = "foo" and (dc.creator = "smith" or dc.creator = "jones")|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"foo\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"foo\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"smith\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"smith\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"jones\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"jones\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}
|
||||
dc.creator = "smith" and dc.creator = "jones"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"smith\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"smith\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"jones\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"jones\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
dc.date = 2007-09-30 or dc.date = "2007-09-30T12:34:56"|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"2007-09-30","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2007-09-30\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"2007-09-30T12:34:56\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"2007-09-30T12:34:56\"\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}}
|
||||
identifier = 0783923126590|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"0783923126590","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"0783923126590\"","fields":["identifier^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
identifier = "9783923126590"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"9783923126590\"","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"9783923126590\"\"","fields":["identifier^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
identifier = "9783923126590*"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"9783923126590*\"","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"9783923126590*\"\"","fields":["identifier^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.identifier =/bib.identifierAuthority=isbn "0201563177"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"0201563177\"","fields":["bib.identifierAuthority=isbn"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"0201563177\"\"","fields":["bib.identifierAuthority=isbn^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.identifier =/bib.identifierAuthority=isbn "0201563177" and dc.title=unix sortby dc.date|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"0201563177\"","fields":["bib.identifierAuthority=isbn"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"0201563177\"\"","fields":["bib.identifierAuthority=isbn^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},"sort":[{"dc.date":{"unmapped_type":"string","missing":"_last"}}]}
|
||||
anywhere = "linux unix \"grundkurs für einsteiger\""|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"linux unix \\\"grundkurs für einsteiger\\\"\"","fields":["anywhere"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.date=2003|{"from":0,"size":10,"query":{"simple_query_string":{"query":"2003","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.date="2003"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"2003\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.creator=smith|{"from":0,"size":10,"query":{"simple_query_string":{"query":"smith","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.title=financing|{"from":0,"size":10,"query":{"simple_query_string":{"query":"financing","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.subject=financing|{"from":0,"size":10,"query":{"simple_query_string":{"query":"financing","fields":["dc.subject"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
"feathered dinosaur" and (yixian or jehol)|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"feathered dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"bool":{"should":[{"simple_query_string":{"query":"yixian","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"jehol","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
(a or b) and (c or d)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"a","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"b","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"c","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"d","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
unix AND wolfinger|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
"keine angst" AND unix|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"keine angst","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title=unix or wolfinger|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"wolfinger","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
(dc.title = unix or dc.date = 2003) and ( dc.creator = wolfinger and dc.creator = christine or dc.creator = maier )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"2003","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"should":[{"bool":{"must":[{"simple_query_string":{"query":"wolfinger","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"christine","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"simple_query_string":{"query":"maier","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
financing AND success|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
financing OR monetary|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
financing NOT success|{"from":0,"size":10,"query":{"bool":{"must_not":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
(financing AND monetary) OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
financing AND (monetary OR success)|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"financing","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"bool":{"should":[{"simple_query_string":{"query":"monetary","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
"financing constraints" OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
"financing constraints" NOT model|{"from":0,"size":10,"query":{"bool":{"must_not":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
("financing constraints" AND model) OR success|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
"financing constraints" AND (model OR success)|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"financing constraints","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"bool":{"should":[{"simple_query_string":{"query":"model","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"success","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
dinosaur or bird|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dino and "eiszeit"|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"dino","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"eiszeit","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dinosaur not reptile|{"from":0,"size":10,"query":{"bool":{"must_not":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"reptile","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "christine" )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"must":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"christine\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
date = 2007-09-30 or date = "2007-09-30T12:34:56"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"2007-09-30","fields":["date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2007-09-30T12:34:56\"","fields":["date"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dinosaur and bird or dinobird|{"from":0,"size":10,"query":{"bool":{"should":[{"bool":{"must":[{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"simple_query_string":{"query":"dinobird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
(bird or dinosaur) and (feathers or scales)|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"bird","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"dinosaur","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"should":[{"simple_query_string":{"query":"feathers","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"scales","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
linux and creator = wolfinger|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"wolfinger","fields":["creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title=linux and dc.title = unix|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"linux","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title = unix and dc.date = 2000|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"2000","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title = "unix" and dc.creator = "wolfinger"|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title = "unix" or dc.creator = "wolfinger"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.title = "unix" and ( dc.creator = "wolfinger" or dc.creator = "meyer" )|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
dc.title = "unix" and dc.creator = "wolfinger" and dc.creator = "christine"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"must":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"simple_query_string":{"query":"\"christine\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" )|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"must":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
dc.title = "foo" and (dc.creator = "smith" or dc.creator = "jones")|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"\"foo\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"bool":{"should":[{"simple_query_string":{"query":"\"smith\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"jones\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}
|
||||
dc.creator = "smith" and dc.creator = "jones"|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"\"smith\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"jones\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
dc.date = 2007-09-30 or dc.date = "2007-09-30T12:34:56"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"2007-09-30","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"2007-09-30T12:34:56\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}]}}}
|
||||
identifier = 0783923126590|{"from":0,"size":10,"query":{"simple_query_string":{"query":"0783923126590","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
identifier = "9783923126590"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"9783923126590\"","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
identifier = "9783923126590*"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"9783923126590*\"","fields":["identifier"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.identifier =/bib.identifierAuthority=isbn "0201563177"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"0201563177\"","fields":["bib.identifierAuthority=isbn"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.identifier =/bib.identifierAuthority=isbn "0201563177" and dc.title=unix sortby dc.date|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"\"0201563177\"","fields":["bib.identifierAuthority=isbn"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"unix","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}},"sort":[{"dc.date":{"ignore_unmapped":"true","missing":"_last"}}]}
|
||||
dc.date > 2007-09-30 and dc.date < "2007-10-30T12:34:56"|{"from":0,"size":10,"query":{"bool":{"must":[{"range":{"dc.date":{"from":"2007-09-30","include_lower":false}}},{"range":{"dc.date":{"to":"\"2007-10-30T12:34:56\"","include_upper":false}}}]}}}
|
||||
date > 2007-01-01|{"from":0,"size":10,"query":{"range":{"date":{"from":"2007-01-01","include_lower":false}}}}
|
||||
dc.date <= 2006-07-01|{"from":0,"size":10,"query":{"range":{"dc.date":{"to":"2006-07-01","include_upper":true}}}}
|
||||
dc.date >= 2005-02-31|{"from":0,"size":10,"query":{"range":{"dc.date":{"from":"2005-02-31","include_lower":true}}}}
|
||||
dc.date > 2011|{"from":0,"size":10,"query":{"range":{"dc.date":{"from":"2011","include_lower":false}}}}
|
||||
dc.date = "> 2003"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"> 2003\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"> 2003\"\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.date = "20012010"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"20012010\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"20012010\"\"","fields":["dc.date^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" ) and filter.subject = "computer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"linux\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"meyer\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}},"filter":{"term":{"subject":"computer"}}}}}
|
||||
unix and filter.date > 2006-01-01|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"range":{"date":{"from":"2006-01-01","include_lower":false}}}}}}
|
||||
unix and (filter.date > 2006-01-01 and filter.date > 2007-01-01)|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"range":{"date":{"from":"2006-01-01","include_lower":false}}}}}}
|
||||
unix and dc.date within "2006 2007"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"range":{"dc.date":{"from":"2006","to":"2007","include_lower":true,"include_upper":true}}}]}}}
|
||||
unix and dc.date within "2006-01-01 2007-01-01"|{"from":0,"size":10,"query":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"range":{"dc.date":{"from":"2006-01-01","to":"2007-01-01","include_lower":true,"include_upper":true}}}]}}}
|
||||
unix and filter.date within "2006-01-01 2007-01-01"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"range":{"date":{"from":"2006-01-01","to":"2007-01-01","include_lower":true,"include_upper":true}}}}}}
|
||||
dc.title = "unix" and filter.creator = "wolfinger"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"creator":"wolfinger"}}}}}
|
||||
dc.title = "unix" and filter.creator = "wolfinger" or filter.creator = "meyer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"wolfinger"}},{"term":{"creator":"meyer"}}]}}}}}
|
||||
dc.title = "unix" and (filter.creator = "wolfinger" and filter.subject= Computer)|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"bool":{"must":[{"term":{"creator":"wolfinger"}},{"term":{"subject":"Computer"}}]}}}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" ) and filter.subject = "computer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":[{"bool":{"should":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"unix\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"linux\"\"","fields":["dc.title^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}},{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"wolfinger\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},{"bool":{"should":[{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"meyer\"\"","fields":["dc.creator^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}]}}]}}}},"filter":{"term":{"subject":"computer"}}}}}
|
||||
test and (filter.creator = "a" and filter.subject = "b")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"bool":{"must":[{"term":{"creator":"a"}},{"term":{"subject":"b"}}]}}}}}
|
||||
test and filter.creator = "a" or filter.subject = "b"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"a"}},{"term":{"subject":"b"}}]}}}}}
|
||||
test and filter.creator = "smith"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test and filter.creator = "smith" or filter.creator = "jones"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test and (filter.creator = "smith" and filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test or filter.creator = "smith" and filter.creator = "jones"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"jones"}},{"term":{"creator":"smith"}}]}}}}}
|
||||
test or (filter.creator = "smith" and filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test and (filter.creator = "smith" or filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test or (filter.creator = "smith" or filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test and (filter.creator = "smith" or filter.creator = "jones" and filter.subject = "unix")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"bool":{"should":[{"bool":{"must":[{"term":{"creator":"smith"}},{"term":{"subject":"unix"}}]}},{"term":{"creator":"jones"}}]}}}}}
|
||||
structure AND filter.creator="smith"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"structure\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
structure AND filter.subject="data"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"structure\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"subject":"data"}}}}}
|
||||
structure AND filter.date="2003"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"structure\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"date":"2003"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"pädagogik\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"taxonomy":"0/24/"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/313/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"pädagogik\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"taxonomy":"0/24/313/"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/313/21/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"pädagogik\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"term":{"taxonomy":"0/24/313/21/"}}}}}
|
||||
linux and filter.creator <> "Wolfinger"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"not":{"term":{"creator":"Wolfinger"}}}}}}
|
||||
unix and option.offset = 10 and option.length = 20|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}}}
|
||||
test and option.length = 1 and option.length = 2 and option.length = 3|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"test\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}}}}}
|
||||
unix sortby date|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},"sort":[{"date":{"unmapped_type":"string","missing":"_last"}}]}
|
||||
unix sortby date/sort.descending|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},"sort":[{"date":{"order":"desc","unmapped_type":"string","missing":"_last"}}]}
|
||||
unix sortby date/sort.descending geo/sort.ascending|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},"sort":[{"date":{"order":"desc","unmapped_type":"string","missing":"_last"}}]}
|
||||
unix sortby geo/sort.ascending/sort.unit=km/sort.lat=50.9415016174/sort.lon=6.95853996277|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},"sort":[{"geo":{"order":"asc","sort.unit":"km","sort.lat":"50.9415016174","sort.lon":"6.95853996277","unmapped_type":"string","missing":"_last"}}]}
|
||||
unix sortby geo/sort.ascending/sort.unit=km/sort.center="(50.9415016174,6.95853996277)"|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}},"sort":[{"geo":{"order":"asc","sort.unit":"km","sort.center":"\"(50.9415016174,6.95853996277)\"","unmapped_type":"string","missing":"_last"}}]}
|
||||
bib.namePersonal = meier|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"meier","fields":["bib.namePersonal"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"meier\"","fields":["bib.namePersonal^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
unix and filter.location any "DE-929 DE-107 DE-Zw1"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}}}
|
||||
unix and filter.location any "DE-929 DE-107 DE-Zw1" sortby date/sort.descending|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}},"sort":[{"date":{"order":"desc","unmapped_type":"string","missing":"_last"}}]}
|
||||
unix and option.offset = 10 and option.length = 20 and filter.location any "DE-929 DE-107 DE-Zw1" sortby date/sort.descending|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}},"sort":[{"date":{"order":"desc","unmapped_type":"string","missing":"_last"}}]}
|
||||
unix and facet.creator = "on"|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.creator = "off"|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.creator = "on" and facet.subject = "on" and facet.date = "off"|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}}}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.date = on|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"should":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"unix\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
(cql.allIndexes = "")|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"\"\"","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"\"\"\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
cql.allIndexes all 3125294126|{"from":0,"size":10,"query":{"bool":{"should":[{"simple_query_string":{"query":"3125294126","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"3125294126\"","fields":["cql.allIndexes^2"],"default_operator":"and"}}],"minimum_should_match":"1"}}}
|
||||
dc.date = "> 2003"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"> 2003\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
dc.date = "20012010"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"20012010\"","fields":["dc.date"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" ) and filter.subject = "computer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"must":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}},"filter":{"term":{"subject":"computer"}}}}}
|
||||
unix and filter.date > 2006-01-01|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"range":{"date":{"from":"2006-01-01","include_lower":false}}}}}}
|
||||
unix and (filter.date > 2006-01-01 and filter.date > 2007-01-01)|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"range":{"date":{"from":"2006-01-01","include_lower":false}}}}}}
|
||||
unix and dc.date within "2006 2007"|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"range":{"dc.date":{"from":"2006","to":"2007","include_lower":true,"include_upper":true}}}]}}}
|
||||
unix and dc.date within "2006-01-01 2007-01-01"|{"from":0,"size":10,"query":{"bool":{"must":[{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},{"range":{"dc.date":{"from":"2006-01-01","to":"2007-01-01","include_lower":true,"include_upper":true}}}]}}}
|
||||
unix and filter.date within "2006-01-01 2007-01-01"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"range":{"date":{"from":"2006-01-01","to":"2007-01-01","include_lower":true,"include_upper":true}}}}}}
|
||||
dc.title = "unix" and filter.creator = "wolfinger"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"creator":"wolfinger"}}}}}
|
||||
dc.title = "unix" and filter.creator = "wolfinger" or filter.creator = "meyer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"wolfinger"}},{"term":{"creator":"meyer"}}]}}}}}
|
||||
dc.title = "unix" and (filter.creator = "wolfinger" and filter.subject= Computer)|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"bool":{"must":[{"term":{"creator":"wolfinger"}},{"term":{"subject":"Computer"}}]}}}}}
|
||||
(dc.title = "unix" or dc.title = "linux") and ( dc.creator = "wolfinger" and dc.creator = "meyer" ) and filter.subject = "computer"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":[{"bool":{"should":[{"simple_query_string":{"query":"\"unix\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"linux\"","fields":["dc.title"],"analyze_wildcard":true,"default_operator":"and"}}]}},{"bool":{"must":[{"simple_query_string":{"query":"\"wolfinger\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}},{"simple_query_string":{"query":"\"meyer\"","fields":["dc.creator"],"analyze_wildcard":true,"default_operator":"and"}}]}}]}}}},"filter":{"term":{"subject":"computer"}}}}}
|
||||
test and (filter.creator = "a" and filter.subject = "b")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"bool":{"must":[{"term":{"creator":"a"}},{"term":{"subject":"b"}}]}}}}}
|
||||
test and filter.creator = "a" or filter.subject = "b"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"a"}},{"term":{"subject":"b"}}]}}}}}
|
||||
test and filter.creator = "smith"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test and filter.creator = "smith" or filter.creator = "jones"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test and (filter.creator = "smith" and filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test or filter.creator = "smith" and filter.creator = "jones"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"should":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}},"filter":{"bool":{"should":[{"term":{"creator":"jones"}},{"term":{"creator":"smith"}}]}}}}}
|
||||
test or (filter.creator = "smith" and filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
test and (filter.creator = "smith" or filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test or (filter.creator = "smith" or filter.creator = "jones")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"should":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"bool":{"should":[{"term":{"creator":"smith"}},{"term":{"creator":"jones"}}]}}}}}
|
||||
test and (filter.creator = "smith" or filter.creator = "jones" and filter.subject = "unix")|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"bool":{"should":[{"bool":{"must":[{"term":{"creator":"smith"}},{"term":{"subject":"unix"}}]}},{"term":{"creator":"jones"}}]}}}}}
|
||||
structure AND filter.creator="smith"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"creator":"smith"}}}}}
|
||||
structure AND filter.subject="data"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"subject":"data"}}}}}
|
||||
structure AND filter.date="2003"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"structure","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"date":"2003"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"taxonomy":"0/24/"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/313/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"taxonomy":"0/24/313/"}}}}}
|
||||
pädagogik AND filter.taxonomy="0/24/313/21/*"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"pädagogik","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"term":{"taxonomy":"0/24/313/21/"}}}}}
|
||||
linux and filter.creator <> "Wolfinger"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"linux","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"not":{"term":{"creator":"Wolfinger"}}}}}}
|
||||
unix and option.offset = 10 and option.length = 20|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}}}
|
||||
test and option.length = 1 and option.length = 2 and option.length = 3|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"simple_query_string":{"query":"test","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}}}}}
|
||||
unix sortby date|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},"sort":[{"date":{"ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix sortby date/sort.descending|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},"sort":[{"date":{"order":"desc","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix sortby date/sort.descending geo/sort.ascending|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},"sort":[{"date":{"order":"desc","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix sortby geo/sort.ascending/sort.unit=km/sort.lat=50.9415016174/sort.lon=6.95853996277|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},"sort":[{"geo":{"order":"asc","sort.unit":"km","sort.lat":"50.9415016174","sort.lon":"6.95853996277","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix sortby geo/sort.ascending/sort.unit=km/sort.center="(50.9415016174,6.95853996277)"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}},"sort":[{"geo":{"order":"asc","sort.unit":"km","sort.center":"\"(50.9415016174,6.95853996277)\"","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
bib.namePersonal = meier|{"from":0,"size":10,"query":{"simple_query_string":{"query":"meier","fields":["bib.namePersonal"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
unix and filter.location any "DE-929 DE-107 DE-Zw1"|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}}}
|
||||
unix and filter.location any "DE-929 DE-107 DE-Zw1" sortby date/sort.descending|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}},"sort":[{"date":{"order":"desc","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix and option.offset = 10 and option.length = 20 and filter.location any "DE-929 DE-107 DE-Zw1" sortby date/sort.descending|{"from":0,"size":10,"query":{"filtered":{"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}}}},"filter":{"or":[{"term":{"location":"DE-929 DE-107 DE-Zw1"}}]}}},"sort":[{"date":{"order":"desc","ignore_unmapped":"true","missing":"_last"}}]}
|
||||
unix and facet.creator = "on"|{"from":0,"size":10,"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.creator = "off"|{"from":0,"size":10,"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.creator = "on" and facet.subject = "on" and facet.date = "off"|{"from":0,"size":10,"query":{"bool":{"must":{"bool":{"must":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}}}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
unix and facet.date = on|{"from":0,"size":10,"query":{"bool":{"must":{"simple_query_string":{"query":"unix","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}},"aggregations":{"myfacet":"myvalue"}}
|
||||
(cql.allIndexes = "")|{"from":0,"size":10,"query":{"simple_query_string":{"query":"\"\"","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
cql.allIndexes all 3125294126|{"from":0,"size":10,"query":{"simple_query_string":{"query":"3125294126","fields":["cql.allIndexes"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
Item.callnumber adj QAP2230|{"from":0,"size":10,"query":{"simple_query_string":{"query":"QAP2230","fields":["Item.callnumber"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
Item.callnumber adj QAP22*|{"from":0,"size":10,"query":{"wildcard":{"Item.callnumber":"QAP22*"}}}
|
||||
Item.callnumber adj "K 32/70 A 10"|{"from":0,"size":10,"query":{"simple_query_string":{"query":"K 32/70 A 10","fields":["Item.callnumber"],"analyze_wildcard":true,"default_operator":"and"}}}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
group = org.xbib
|
||||
name = cql
|
||||
version = 4.0.1
|
||||
version = 5.1.1
|
||||
|
||||
gradle.wrapper.version = 6.6.1
|
||||
xbib-datastructures.version = 1.0.0
|
||||
org.gradle.warning.mode = ALL
|
||||
|
|
|
@ -2,17 +2,12 @@
|
|||
apply plugin: 'java-library'
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
modularity.inferModulePath.set(true)
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -21,23 +16,15 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier 'javadoc'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar, javadocJar
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.fork = true
|
||||
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
|
||||
options.compilerArgs << '-Xlint:all,-fallthrough'
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
|
16
gradle/publish/forgejo.gradle
Normal file
16
gradle/publish/forgejo.gradle
Normal file
|
@ -0,0 +1,16 @@
|
|||
if (project.hasProperty('forgeJoToken')) {
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://xbib.org/api/packages/xbib/maven'
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Authorization"
|
||||
value = "token ${project.property('forgeJoToken')}"
|
||||
}
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
27
gradle/publish/ivy.gradle
Normal file
27
gradle/publish/ivy.gradle
Normal file
|
@ -0,0 +1,27 @@
|
|||
apply plugin: 'ivy-publish'
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
ivy {
|
||||
url = "https://xbib.org/repo"
|
||||
}
|
||||
}
|
||||
publications {
|
||||
ivy(IvyPublication) {
|
||||
from components.java
|
||||
descriptor {
|
||||
license {
|
||||
name = 'The Apache License, Version 2.0'
|
||||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
author {
|
||||
name = 'Jörg Prante'
|
||||
url = 'http://example.com/users/jane'
|
||||
}
|
||||
descriptor.description {
|
||||
text = rootProject.ext.description
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,10 @@
|
|||
|
||||
apply plugin: "de.marcphilipp.nexus-publish"
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
"${project.name}"(MavenPublication) {
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
pom {
|
||||
artifactId = project.name
|
||||
name = project.name
|
||||
description = rootProject.ext.description
|
||||
url = rootProject.ext.url
|
||||
|
@ -49,18 +46,6 @@ publishing {
|
|||
if (project.hasProperty("signing.keyId")) {
|
||||
apply plugin: 'signing'
|
||||
signing {
|
||||
sign publishing.publications.mavenJava
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("ossrhUsername")) {
|
||||
nexusPublishing {
|
||||
repositories {
|
||||
sonatype {
|
||||
username = project.property('ossrhUsername')
|
||||
password = project.property('ossrhPassword')
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
||||
sign publishing.publications."${project.name}"
|
||||
}
|
||||
}
|
11
gradle/publish/sonatype.gradle
Normal file
11
gradle/publish/sonatype.gradle
Normal file
|
@ -0,0 +1,11 @@
|
|||
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
|
||||
nexusPublishing {
|
||||
repositories {
|
||||
sonatype {
|
||||
username = project.property('ossrhUsername')
|
||||
password = project.property('ossrhPassword')
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
|
||||
|
||||
apply plugin: 'io.codearte.nexus-staging'
|
||||
|
||||
nexusStaging {
|
||||
username = project.property('ossrhUsername')
|
||||
password = project.property('ossrhPassword')
|
||||
packageGroup = "org.xbib"
|
||||
}
|
||||
}
|
19
gradle/quality/checkstyle.gradle
Normal file
19
gradle/quality/checkstyle.gradle
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
tasks.withType(Checkstyle) {
|
||||
ignoreFailures = true
|
||||
reports {
|
||||
xml.getRequired().set(true)
|
||||
html.getRequired().set(true)
|
||||
}
|
||||
}
|
||||
|
||||
checkstyle {
|
||||
configFile = rootProject.file('gradle/quality/checkstyle.xml')
|
||||
ignoreFailures = true
|
||||
showViolations = true
|
||||
checkstyleMain {
|
||||
source = sourceSets.main.allSource
|
||||
}
|
||||
}
|
333
gradle/quality/checkstyle.xml
Normal file
333
gradle/quality/checkstyle.xml
Normal file
|
@ -0,0 +1,333 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<!-- This is a checkstyle configuration file. For descriptions of
|
||||
what the following rules do, please see the checkstyle configuration
|
||||
page at http://checkstyle.sourceforge.net/config.html -->
|
||||
|
||||
<module name="Checker">
|
||||
|
||||
<module name="BeforeExecutionExclusionFileFilter">
|
||||
<property name="fileNamePattern" value=".*(Example|Test|module-info)(\$.*)?"/>
|
||||
</module>
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<!-- Checks that there are no tab characters in the file.
|
||||
-->
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- Checks that FIXME is not used in comments. TODO is preferred.
|
||||
-->
|
||||
<property name="format" value="((//.*)|(\*.*))FIXME" />
|
||||
<property name="message" value='TODO is preferred to FIXME. e.g. "TODO(johndoe): Refactor when v2 is released."' />
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<!-- Checks that TODOs are named. (Actually, just that they are followed
|
||||
by an open paren.)
|
||||
-->
|
||||
<property name="format" value="((//.*)|(\*.*))TODO[^(]" />
|
||||
<property name="message" value='All TODOs should be named. e.g. "TODO(johndoe): Refactor when v2 is released."' />
|
||||
</module>
|
||||
|
||||
<module name="JavadocPackage">
|
||||
<!-- Checks that each Java package has a Javadoc file used for commenting.
|
||||
Only allows a package-info.java, not package.html. -->
|
||||
</module>
|
||||
|
||||
<!-- All Java AST specific tests live under TreeWalker module. -->
|
||||
<module name="TreeWalker">
|
||||
|
||||
<!--
|
||||
|
||||
IMPORT CHECKS
|
||||
|
||||
-->
|
||||
|
||||
<module name="RedundantImport">
|
||||
<!-- Checks for redundant import statements. -->
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="ImportOrder">
|
||||
<!-- Checks for out of order import statements. -->
|
||||
|
||||
<property name="severity" value="warning"/>
|
||||
<!-- <property name="tokens" value="IMPORT, STATIC_IMPORT"/> -->
|
||||
<property name="separated" value="false"/>
|
||||
<property name="groups" value="*"/>
|
||||
<!-- <property name="option" value="above"/> -->
|
||||
<property name="sortStaticImportsAlphabetically" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="CustomImportOrder">
|
||||
<!-- <property name="customImportOrderRules" value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###STATIC"/> -->
|
||||
<!-- <property name="specialImportsRegExp" value="^javax\."/> -->
|
||||
<!-- <property name="standardPackageRegExp" value="^java\."/> -->
|
||||
<property name="sortImportsInGroupAlphabetically" value="true"/>
|
||||
<property name="separateLineBetweenGroups" value="false"/>
|
||||
</module>
|
||||
|
||||
<!--
|
||||
|
||||
JAVADOC CHECKS
|
||||
|
||||
-->
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
|
||||
<module name="JavadocMethod">
|
||||
<property name="accessModifiers" value="protected"/>
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingReturnTag" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="protected"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocStyle">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<!--
|
||||
|
||||
NAMING CHECKS
|
||||
|
||||
-->
|
||||
|
||||
<!-- Item 38 - Adhere to generally accepted naming conventions -->
|
||||
|
||||
<module name="PackageName">
|
||||
<!-- Validates identifiers for package names against the
|
||||
supplied expression. -->
|
||||
<!-- Here the default checkstyle rule restricts package name parts to
|
||||
seven characters, this is not in line with common practice at Google.
|
||||
-->
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="TypeNameCheck">
|
||||
<!-- Validates static, final fields against the
|
||||
expression "^[A-Z][a-zA-Z0-9]*$". -->
|
||||
<metadata name="altname" value="TypeName"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="ConstantNameCheck">
|
||||
<!-- Validates non-private, static, final fields against the supplied
|
||||
public/package final fields "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
|
||||
<metadata name="altname" value="ConstantName"/>
|
||||
<property name="applyToPublic" value="true"/>
|
||||
<property name="applyToProtected" value="true"/>
|
||||
<property name="applyToPackage" value="true"/>
|
||||
<property name="applyToPrivate" value="false"/>
|
||||
<property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|FLAG_.*)$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Variable ''{0}'' should be in ALL_CAPS (if it is a constant) or be private (otherwise)."/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="StaticVariableNameCheck">
|
||||
<!-- Validates static, non-final fields against the supplied
|
||||
expression "^[a-z][a-zA-Z0-9]*_?$". -->
|
||||
<metadata name="altname" value="StaticVariableName"/>
|
||||
<property name="applyToPublic" value="true"/>
|
||||
<property name="applyToProtected" value="true"/>
|
||||
<property name="applyToPackage" value="true"/>
|
||||
<property name="applyToPrivate" value="true"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*_?$"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="MemberNameCheck">
|
||||
<!-- Validates non-static members against the supplied expression. -->
|
||||
<metadata name="altname" value="MemberName"/>
|
||||
<property name="applyToPublic" value="true"/>
|
||||
<property name="applyToProtected" value="true"/>
|
||||
<property name="applyToPackage" value="true"/>
|
||||
<property name="applyToPrivate" value="true"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="MethodNameCheck">
|
||||
<!-- Validates identifiers for method names. -->
|
||||
<metadata name="altname" value="MethodName"/>
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="ParameterName">
|
||||
<!-- Validates identifiers for method parameters against the
|
||||
expression "^[a-z][a-zA-Z0-9]*$". -->
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="LocalFinalVariableName">
|
||||
<!-- Validates identifiers for local final variables against the
|
||||
expression "^[a-z][a-zA-Z0-9]*$". -->
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="LocalVariableName">
|
||||
<!-- Validates identifiers for local variables against the
|
||||
expression "^[a-z][a-zA-Z0-9]*$". -->
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
LENGTH and CODING CHECKS
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<module name="LeftCurly">
|
||||
<!-- Checks for placement of the left curly brace ('{'). -->
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="RightCurly">
|
||||
<!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on
|
||||
the same line. e.g., the following example is fine:
|
||||
<pre>
|
||||
if {
|
||||
...
|
||||
} else
|
||||
</pre>
|
||||
-->
|
||||
<!-- This next example is not fine:
|
||||
<pre>
|
||||
if {
|
||||
...
|
||||
}
|
||||
else
|
||||
</pre>
|
||||
-->
|
||||
<property name="option" value="same"/>
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for braces around if and else blocks -->
|
||||
<module name="NeedBraces">
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="tokens" value="LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO"/>
|
||||
</module>
|
||||
|
||||
<module name="UpperEll">
|
||||
<!-- Checks that long constants are defined with an upper ell.-->
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="FallThrough">
|
||||
<!-- Warn about falling through to the next case statement. Similar to
|
||||
javac -Xlint:fallthrough, but the check is suppressed if a single-line comment
|
||||
on the last non-blank line preceding the fallen-into case contains 'fall through' (or
|
||||
some other variants which we don't publicized to promote consistency).
|
||||
-->
|
||||
<property name="reliefPattern"
|
||||
value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
MODIFIERS CHECKS
|
||||
|
||||
-->
|
||||
|
||||
<module name="ModifierOrder">
|
||||
<!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
|
||||
8.4.3. The prescribed order is:
|
||||
public, protected, private, abstract, static, final, transient, volatile,
|
||||
synchronized, native, strictfp
|
||||
-->
|
||||
</module>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
WHITESPACE CHECKS
|
||||
|
||||
-->
|
||||
|
||||
<module name="WhitespaceAround">
|
||||
<!-- Checks that various tokens are surrounded by whitespace.
|
||||
This includes most binary operators and keywords followed
|
||||
by regular or curly braces.
|
||||
-->
|
||||
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR,
|
||||
BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN,
|
||||
EQUAL, GE, GT, LAND, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE,
|
||||
LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN,
|
||||
LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS,
|
||||
MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION,
|
||||
SL, SL_ASSIGN, SR_ASSIGN, STAR, STAR_ASSIGN"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="WhitespaceAfter">
|
||||
<!-- Checks that commas, semicolons and typecasts are followed by
|
||||
whitespace.
|
||||
-->
|
||||
<property name="tokens" value="COMMA, SEMI, TYPECAST"/>
|
||||
</module>
|
||||
|
||||
<module name="NoWhitespaceAfter">
|
||||
<!-- Checks that there is no whitespace after various unary operators.
|
||||
Linebreaks are allowed.
|
||||
-->
|
||||
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS,
|
||||
UNARY_PLUS"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="NoWhitespaceBefore">
|
||||
<!-- Checks that there is no whitespace before various unary operators.
|
||||
Linebreaks are allowed.
|
||||
-->
|
||||
<property name="tokens" value="SEMI, DOT, POST_DEC, POST_INC"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
<property name="severity" value="error"/>
|
||||
</module>
|
||||
|
||||
<module name="ParenPad">
|
||||
<!-- Checks that there is no whitespace before close parens or after
|
||||
open parens.
|
||||
-->
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<!-- Checks if a line is too long. -->
|
||||
<property name="max" value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.max}" default="128"/>
|
||||
<property name="severity" value="error"/>
|
||||
|
||||
<!--
|
||||
The default ignore pattern exempts the following elements:
|
||||
- import statements
|
||||
- long URLs inside comments
|
||||
-->
|
||||
|
||||
<property name="ignorePattern"
|
||||
value="${com.puppycrawl.tools.checkstyle.checks.sizes.LineLength.ignorePattern}"
|
||||
default="^(package .*;\s*)|(import .*;\s*)|( *(\*|//).*https?://.*)$"/>
|
||||
</module>
|
||||
</module>
|
||||
|
11
gradle/quality/cyclonedx.gradle
Normal file
11
gradle/quality/cyclonedx.gradle
Normal file
|
@ -0,0 +1,11 @@
|
|||
cyclonedxBom {
|
||||
includeConfigs = [ 'runtimeClasspath' ]
|
||||
skipConfigs = [ 'compileClasspath', 'testCompileClasspath' ]
|
||||
projectType = "library"
|
||||
schemaVersion = "1.4"
|
||||
destination = file("build/reports")
|
||||
outputName = "bom"
|
||||
outputFormat = "json"
|
||||
includeBomSerialNumber = true
|
||||
componentVersion = "2.0.0"
|
||||
}
|
17
gradle/quality/pmd.gradle
Normal file
17
gradle/quality/pmd.gradle
Normal file
|
@ -0,0 +1,17 @@
|
|||
|
||||
apply plugin: 'pmd'
|
||||
|
||||
tasks.withType(Pmd) {
|
||||
ignoreFailures = true
|
||||
reports {
|
||||
xml.getRequired().set(true)
|
||||
html.getRequired().set(true)
|
||||
}
|
||||
}
|
||||
|
||||
pmd {
|
||||
ignoreFailures = true
|
||||
consoleOutput = false
|
||||
toolVersion = "6.51.0"
|
||||
ruleSetFiles = rootProject.files('gradle/quality/pmd/category/java/bestpractices.xml')
|
||||
}
|
1650
gradle/quality/pmd/category/java/bestpractices.xml
Normal file
1650
gradle/quality/pmd/category/java/bestpractices.xml
Normal file
File diff suppressed because it is too large
Load diff
10
gradle/quality/pmd/category/java/categories.properties
Normal file
10
gradle/quality/pmd/category/java/categories.properties
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
rulesets.filenames=\
|
||||
category/java/bestpractices.xml,\
|
||||
category/java/codestyle.xml,\
|
||||
category/java/design.xml,\
|
||||
category/java/documentation.xml,\
|
||||
category/java/errorprone.xml,\
|
||||
category/java/multithreading.xml,\
|
||||
category/java/performance.xml,\
|
||||
category/java/security.xml
|
2176
gradle/quality/pmd/category/java/codestyle.xml
Normal file
2176
gradle/quality/pmd/category/java/codestyle.xml
Normal file
File diff suppressed because it is too large
Load diff
1657
gradle/quality/pmd/category/java/design.xml
Normal file
1657
gradle/quality/pmd/category/java/design.xml
Normal file
File diff suppressed because it is too large
Load diff
144
gradle/quality/pmd/category/java/documentation.xml
Normal file
144
gradle/quality/pmd/category/java/documentation.xml
Normal file
|
@ -0,0 +1,144 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<ruleset name="Documentation"
|
||||
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
||||
|
||||
<description>
|
||||
Rules that are related to code documentation.
|
||||
</description>
|
||||
|
||||
<rule name="CommentContent"
|
||||
since="5.0"
|
||||
message="Invalid words or phrases found"
|
||||
class="net.sourceforge.pmd.lang.java.rule.documentation.CommentContentRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_documentation.html#commentcontent">
|
||||
<description>
|
||||
A rule for the politically correct... we don't want to offend anyone.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
//OMG, this is horrible, Bob is an idiot !!!
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="CommentRequired"
|
||||
since="5.1"
|
||||
message="Comment is required"
|
||||
class="net.sourceforge.pmd.lang.java.rule.documentation.CommentRequiredRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_documentation.html#commentrequired">
|
||||
<description>
|
||||
Denotes whether comments are required (or unwanted) for specific language elements.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Jon Doe
|
||||
*/
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="CommentSize"
|
||||
since="5.0"
|
||||
message="Comment is too large"
|
||||
class="net.sourceforge.pmd.lang.java.rule.documentation.CommentSizeRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_documentation.html#commentsize">
|
||||
<description>
|
||||
Determines whether the dimensions of non-header comments found are within the specified limits.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
/**
|
||||
*
|
||||
* too many lines!
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UncommentedEmptyConstructor"
|
||||
language="java"
|
||||
since="3.4"
|
||||
message="Document empty constructor"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
typeResolution="true"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_documentation.html#uncommentedemptyconstructor">
|
||||
<description>
|
||||
Uncommented Empty Constructor finds instances where a constructor does not
|
||||
contain statements, but there is no comment. By explicitly commenting empty
|
||||
constructors it is easier to distinguish between intentional (commented)
|
||||
and unintentional empty constructors.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//ConstructorDeclaration[@Private='false']
|
||||
[count(BlockStatement) = 0 and ($ignoreExplicitConstructorInvocation = 'true' or not(ExplicitConstructorInvocation)) and @containsComment = 'false']
|
||||
[not(../Annotation/MarkerAnnotation/Name[pmd-java:typeIs('javax.inject.Inject')])]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
<property name="ignoreExplicitConstructorInvocation" type="Boolean" description="Ignore explicit constructor invocation when deciding whether constructor is empty or not" value="false"/>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public Foo() {
|
||||
// This constructor is intentionally empty. Nothing special is needed here.
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UncommentedEmptyMethodBody"
|
||||
language="java"
|
||||
since="3.4"
|
||||
message="Document empty method body"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_documentation.html#uncommentedemptymethodbody">
|
||||
<description>
|
||||
Uncommented Empty Method Body finds instances where a method body does not contain
|
||||
statements, but there is no comment. By explicitly commenting empty method bodies
|
||||
it is easier to distinguish between intentional (commented) and unintentional
|
||||
empty methods.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//MethodDeclaration/Block[count(BlockStatement) = 0 and @containsComment = 'false']
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public void doSomething() {
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
3383
gradle/quality/pmd/category/java/errorprone.xml
Normal file
3383
gradle/quality/pmd/category/java/errorprone.xml
Normal file
File diff suppressed because it is too large
Load diff
393
gradle/quality/pmd/category/java/multithreading.xml
Normal file
393
gradle/quality/pmd/category/java/multithreading.xml
Normal file
|
@ -0,0 +1,393 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<ruleset name="Multithreading"
|
||||
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
||||
|
||||
<description>
|
||||
Rules that flag issues when dealing with multiple threads of execution.
|
||||
</description>
|
||||
|
||||
<rule name="AvoidSynchronizedAtMethodLevel"
|
||||
language="java"
|
||||
since="3.0"
|
||||
message="Use block level rather than method level synchronization"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#avoidsynchronizedatmethodlevel">
|
||||
<description>
|
||||
Method-level synchronization can cause problems when new code is added to the method.
|
||||
Block-level synchronization helps to ensure that only the code that needs synchronization
|
||||
gets it.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>//MethodDeclaration[@Synchronized='true']</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
// Try to avoid this:
|
||||
synchronized void foo() {
|
||||
}
|
||||
// Prefer this:
|
||||
void bar() {
|
||||
synchronized(this) {
|
||||
}
|
||||
}
|
||||
|
||||
// Try to avoid this for static methods:
|
||||
static synchronized void fooStatic() {
|
||||
}
|
||||
|
||||
// Prefer this:
|
||||
static void barStatic() {
|
||||
synchronized(Foo.class) {
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="AvoidThreadGroup"
|
||||
language="java"
|
||||
since="3.6"
|
||||
message="Avoid using java.lang.ThreadGroup; it is not thread safe"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
typeResolution="true"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#avoidthreadgroup">
|
||||
<description>
|
||||
Avoid using java.lang.ThreadGroup; although it is intended to be used in a threaded environment
|
||||
it contains methods that are not thread-safe.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//AllocationExpression/ClassOrInterfaceType[pmd-java:typeIs('java.lang.ThreadGroup')]|
|
||||
//PrimarySuffix[contains(@Image, 'getThreadGroup')]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Bar {
|
||||
void buz() {
|
||||
ThreadGroup tg = new ThreadGroup("My threadgroup");
|
||||
tg = new ThreadGroup(tg, "my thread group");
|
||||
tg = Thread.currentThread().getThreadGroup();
|
||||
tg = System.getSecurityManager().getThreadGroup();
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="AvoidUsingVolatile"
|
||||
language="java"
|
||||
since="4.1"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
message="Use of modifier volatile is not recommended."
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#avoidusingvolatile">
|
||||
<description>
|
||||
Use of the keyword 'volatile' is generally used to fine tune a Java application, and therefore, requires
|
||||
a good expertise of the Java Memory Model. Moreover, its range of action is somewhat misknown. Therefore,
|
||||
the volatile keyword should not be used for maintenance purpose and portability.
|
||||
</description>
|
||||
<priority>2</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>//FieldDeclaration[contains(@Volatile,'true')]</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class ThrDeux {
|
||||
private volatile String var1; // not suggested
|
||||
private String var2; // preferred
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="DoNotUseThreads"
|
||||
language="java"
|
||||
since="4.1"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
message="To be compliant to J2EE, a webapp should not use any thread."
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#donotusethreads">
|
||||
<description>
|
||||
The J2EE specification explicitly forbids the use of threads.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>//ClassOrInterfaceType[@Image = 'Thread' or @Image = 'Runnable']</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
// This is not allowed
|
||||
public class UsingThread extends Thread {
|
||||
|
||||
}
|
||||
|
||||
// Neither this,
|
||||
public class OtherThread implements Runnable {
|
||||
// Nor this ...
|
||||
public void methode() {
|
||||
Runnable thread = new Thread(); thread.run();
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="DontCallThreadRun"
|
||||
language="java"
|
||||
since="4.3"
|
||||
message="Don't call Thread.run() explicitly, use Thread.start()"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
typeResolution="true"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#dontcallthreadrun">
|
||||
<description>
|
||||
Explicitly calling Thread.run() method will execute in the caller's thread of control. Instead, call Thread.start() for the intended behavior.
|
||||
</description>
|
||||
<priority>4</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//StatementExpression/PrimaryExpression
|
||||
[
|
||||
PrimaryPrefix
|
||||
[
|
||||
./Name[ends-with(@Image, '.run') or @Image = 'run']
|
||||
and substring-before(Name/@Image, '.') =//VariableDeclarator/VariableDeclaratorId/@Image
|
||||
[../../../Type/ReferenceType/ClassOrInterfaceType[pmd-java:typeIs('java.lang.Thread')]]
|
||||
or (./AllocationExpression/ClassOrInterfaceType[pmd-java:typeIs('java.lang.Thread')]
|
||||
and ../PrimarySuffix[@Image = 'run'])
|
||||
]
|
||||
]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
Thread t = new Thread();
|
||||
t.run(); // use t.start() instead
|
||||
new Thread().run(); // same violation
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="DoubleCheckedLocking"
|
||||
language="java"
|
||||
since="1.04"
|
||||
message="Double checked locking is not thread safe in Java."
|
||||
class="net.sourceforge.pmd.lang.java.rule.multithreading.DoubleCheckedLockingRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#doublecheckedlocking">
|
||||
<description>
|
||||
Partially created objects can be returned by the Double Checked Locking pattern when used in Java.
|
||||
An optimizing JRE may assign a reference to the baz variable before it calls the constructor of the object the
|
||||
reference points to.
|
||||
|
||||
Note: With Java 5, you can make Double checked locking work, if you declare the variable to be `volatile`.
|
||||
|
||||
For more details refer to: <http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-double.html>
|
||||
or <http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html>
|
||||
</description>
|
||||
<priority>1</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
/*volatile */ Object baz = null; // fix for Java5 and later: volatile
|
||||
Object bar() {
|
||||
if (baz == null) { // baz may be non-null yet not fully created
|
||||
synchronized(this) {
|
||||
if (baz == null) {
|
||||
baz = new Object();
|
||||
}
|
||||
}
|
||||
}
|
||||
return baz;
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="NonThreadSafeSingleton"
|
||||
since="3.4"
|
||||
message="Singleton is not thread safe"
|
||||
class="net.sourceforge.pmd.lang.java.rule.multithreading.NonThreadSafeSingletonRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#nonthreadsafesingleton">
|
||||
<description>
|
||||
Non-thread safe singletons can result in bad state changes. Eliminate
|
||||
static singletons if possible by instantiating the object directly. Static
|
||||
singletons are usually not needed as only a single instance exists anyway.
|
||||
Other possible fixes are to synchronize the entire method or to use an
|
||||
[initialize-on-demand holder class](https://en.wikipedia.org/wiki/Initialization-on-demand_holder_idiom).
|
||||
|
||||
Refrain from using the double-checked locking pattern. The Java Memory Model doesn't
|
||||
guarantee it to work unless the variable is declared as `volatile`, adding an uneeded
|
||||
performance penalty. [Reference](http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html)
|
||||
|
||||
See Effective Java, item 48.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
private static Foo foo = null;
|
||||
|
||||
//multiple simultaneous callers may see partially initialized objects
|
||||
public static Foo getFoo() {
|
||||
if (foo==null) {
|
||||
foo = new Foo();
|
||||
}
|
||||
return foo;
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UnsynchronizedStaticDateFormatter"
|
||||
since="3.6"
|
||||
deprecated="true"
|
||||
message="Static DateFormatter objects should be accessed in a synchronized manner"
|
||||
class="net.sourceforge.pmd.lang.java.rule.multithreading.UnsynchronizedStaticDateFormatterRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#unsynchronizedstaticdateformatter">
|
||||
<description>
|
||||
SimpleDateFormat instances are not synchronized. Sun recommends using separate format instances
|
||||
for each thread. If multiple threads must access a static formatter, the formatter must be
|
||||
synchronized either on method or block level.
|
||||
|
||||
This rule has been deprecated in favor of the rule {% rule UnsynchronizedStaticFormatter %}.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat();
|
||||
void bar() {
|
||||
sdf.format(); // poor, no thread-safety
|
||||
}
|
||||
synchronized void foo() {
|
||||
sdf.format(); // preferred
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UnsynchronizedStaticFormatter"
|
||||
since="6.11.0"
|
||||
message="Static Formatter objects should be accessed in a synchronized manner"
|
||||
class="net.sourceforge.pmd.lang.java.rule.multithreading.UnsynchronizedStaticFormatterRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#unsynchronizedstaticformatter">
|
||||
<description>
|
||||
Instances of `java.text.Format` are generally not synchronized.
|
||||
Sun recommends using separate format instances for each thread.
|
||||
If multiple threads must access a static formatter, the formatter must be
|
||||
synchronized either on method or block level.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
private static final SimpleDateFormat sdf = new SimpleDateFormat();
|
||||
void bar() {
|
||||
sdf.format(); // poor, no thread-safety
|
||||
}
|
||||
synchronized void foo() {
|
||||
sdf.format(); // preferred
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UseConcurrentHashMap"
|
||||
language="java"
|
||||
minimumLanguageVersion="1.5"
|
||||
since="4.2.6"
|
||||
message="If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#useconcurrenthashmap">
|
||||
<description>
|
||||
Since Java5 brought a new implementation of the Map designed for multi-threaded access, you can
|
||||
perform efficient map reads without blocking other threads.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//Type[../VariableDeclarator/VariableInitializer//AllocationExpression/ClassOrInterfaceType[@Image != 'ConcurrentHashMap']]
|
||||
/ReferenceType/ClassOrInterfaceType[@Image = 'Map']
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class ConcurrentApp {
|
||||
public void getMyInstance() {
|
||||
Map map1 = new HashMap(); // fine for single-threaded access
|
||||
Map map2 = new ConcurrentHashMap(); // preferred for use with multiple threads
|
||||
|
||||
// the following case will be ignored by this rule
|
||||
Map map3 = someModule.methodThatReturnMap(); // might be OK, if the returned map is already thread-safe
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="UseNotifyAllInsteadOfNotify"
|
||||
language="java"
|
||||
since="3.0"
|
||||
message="Call Thread.notifyAll() rather than Thread.notify()"
|
||||
class="net.sourceforge.pmd.lang.rule.XPathRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_multithreading.html#usenotifyallinsteadofnotify">
|
||||
<description>
|
||||
Thread.notify() awakens a thread monitoring the object. If more than one thread is monitoring, then only
|
||||
one is chosen. The thread chosen is arbitrary; thus its usually safer to call notifyAll() instead.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<properties>
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//StatementExpression/PrimaryExpression
|
||||
[PrimarySuffix/Arguments[@ArgumentCount = '0']]
|
||||
[
|
||||
PrimaryPrefix[
|
||||
./Name[@Image='notify' or ends-with(@Image,'.notify')]
|
||||
or ../PrimarySuffix/@Image='notify'
|
||||
or (./AllocationExpression and ../PrimarySuffix[@Image='notify'])
|
||||
]
|
||||
]
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
</properties>
|
||||
<example>
|
||||
<![CDATA[
|
||||
void bar() {
|
||||
x.notify();
|
||||
// If many threads are monitoring x, only one (and you won't know which) will be notified.
|
||||
// use instead:
|
||||
x.notifyAll();
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
1006
gradle/quality/pmd/category/java/performance.xml
Normal file
1006
gradle/quality/pmd/category/java/performance.xml
Normal file
File diff suppressed because it is too large
Load diff
65
gradle/quality/pmd/category/java/security.xml
Normal file
65
gradle/quality/pmd/category/java/security.xml
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<ruleset name="Security" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
||||
|
||||
<description>
|
||||
Rules that flag potential security flaws.
|
||||
</description>
|
||||
|
||||
<rule name="HardCodedCryptoKey"
|
||||
since="6.4.0"
|
||||
message="Do not use hard coded encryption keys"
|
||||
class="net.sourceforge.pmd.lang.java.rule.security.HardCodedCryptoKeyRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_security.html#hardcodedcryptokey">
|
||||
<description>
|
||||
Do not use hard coded values for cryptographic operations. Please store keys outside of source code.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
void good() {
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec(Properties.getKey(), "AES");
|
||||
}
|
||||
|
||||
void bad() {
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec("my secret here".getBytes(), "AES");
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
<rule name="InsecureCryptoIv"
|
||||
since="6.3.0"
|
||||
message="Do not use hard coded initialization vector in crypto operations"
|
||||
class="net.sourceforge.pmd.lang.java.rule.security.InsecureCryptoIvRule"
|
||||
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_security.html#insecurecryptoiv">
|
||||
<description>
|
||||
Do not use hard coded initialization vector in cryptographic operations. Please use a randomly generated IV.
|
||||
</description>
|
||||
<priority>3</priority>
|
||||
<example>
|
||||
<![CDATA[
|
||||
public class Foo {
|
||||
void good() {
|
||||
SecureRandom random = new SecureRandom();
|
||||
byte iv[] = new byte[16];
|
||||
random.nextBytes(bytes);
|
||||
}
|
||||
|
||||
void bad() {
|
||||
byte[] iv = new byte[] { 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, };
|
||||
}
|
||||
|
||||
void alsoBad() {
|
||||
byte[] iv = "secret iv in here".getBytes();
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</example>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
37
gradle/quality/sonarqube.gradle
Normal file
37
gradle/quality/sonarqube.gradle
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
subprojects {
|
||||
|
||||
sonarqube {
|
||||
properties {
|
||||
property "sonar.projectName", "${project.group} ${project.name}"
|
||||
property "sonar.sourceEncoding", "UTF-8"
|
||||
property "sonar.tests", "src/test/java"
|
||||
property "sonar.scm.provider", "git"
|
||||
property "sonar.junit.reportsPath", "build/test-results/test/"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tasks.withType(Pmd) {
|
||||
ignoreFailures = true
|
||||
reports {
|
||||
xml.enabled = true
|
||||
html.enabled = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
spotbugs {
|
||||
effort = "max"
|
||||
reportLevel = "low"
|
||||
//includeFilter = file("findbugs-exclude.xml")
|
||||
}
|
||||
|
||||
tasks.withType(com.github.spotbugs.SpotBugsTask) {
|
||||
ignoreFailures = true
|
||||
reports {
|
||||
xml.enabled = false
|
||||
html.enabled = true
|
||||
}
|
||||
}
|
||||
}
|
15
gradle/quality/spotbugs.gradle
Normal file
15
gradle/quality/spotbugs.gradle
Normal file
|
@ -0,0 +1,15 @@
|
|||
|
||||
apply plugin: 'com.github.spotbugs'
|
||||
|
||||
spotbugs {
|
||||
effort = "max"
|
||||
reportLevel = "low"
|
||||
ignoreFailures = true
|
||||
}
|
||||
|
||||
spotbugsMain {
|
||||
reports {
|
||||
xml.getRequired().set(false)
|
||||
html.getRequired().set(true)
|
||||
}
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
|
||||
def junitVersion = project.hasProperty('junit.version')?project.property('junit.version'):'5.6.2'
|
||||
def hamcrestVersion = project.hasProperty('hamcrest.version')?project.property('hamcrest.version'):'2.2'
|
||||
|
||||
dependencies {
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
|
||||
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
|
||||
testImplementation testLibs.junit.jupiter.api
|
||||
testImplementation testLibs.junit.jupiter.params
|
||||
testImplementation testLibs.hamcrest
|
||||
testRuntimeOnly testLibs.junit.jupiter.engine
|
||||
testRuntimeOnly testLibs.junit.jupiter.platform.launcher
|
||||
}
|
||||
|
||||
test {
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
294
gradlew
vendored
294
gradlew
vendored
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -17,67 +17,99 @@
|
|||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
@ -87,9 +119,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
@ -98,88 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
15
gradlew.bat
vendored
15
gradlew.bat
vendored
|
@ -14,7 +14,7 @@
|
|||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
|
@ -25,7 +25,8 @@
|
|||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
|
@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
|
|
@ -1,3 +1,34 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral {
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
ignoreGradleMetadataRedirection()
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
versionCatalogs {
|
||||
libs {
|
||||
version('gradle', '8.5')
|
||||
version('datastructures', '5.0.6')
|
||||
library('datastructures-json', 'org.xbib', 'datastructures-json-tiny').versionRef('datastructures')
|
||||
}
|
||||
testLibs {
|
||||
version('junit', '5.10.0')
|
||||
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
|
||||
library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit')
|
||||
library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
|
||||
library('junit-jupiter-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').version('1.10.0')
|
||||
library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('2.2')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include 'cql-common'
|
||||
include 'cql-elasticsearch'
|
||||
|
|
Loading…
Reference in a new issue