Merge remote-tracking branch 'origin/master' into gradle-master

This commit is contained in:
Dawid Weiss 2019-12-09 10:55:54 +01:00
commit a6d7017f2e
25 changed files with 202 additions and 88 deletions

View File

@ -1094,7 +1094,6 @@
<!-- Restrict access to certain Java features and install security manager: -->
<sysproperty key="common.dir" file="${common.dir}" />
<sysproperty key="common-solr.dir" file="${common.dir}/../solr" />
<sysproperty key="ant.library.dir" file="${ant.library.dir}" />
<sysproperty key="clover.db.dir" file="${clover.db.dir}" />
<syspropertyset>

View File

@ -53,7 +53,7 @@ public final class CharacterUtils {
*/
public static void toLowerCase(final char[] buffer, final int offset, final int limit) {
assert buffer.length >= limit;
assert offset <=0 && offset <= buffer.length;
assert 0 <= offset && offset <= buffer.length;
for (int i = offset; i < limit;) {
i += Character.toChars(
Character.toLowerCase(
@ -70,7 +70,7 @@ public final class CharacterUtils {
*/
public static void toUpperCase(final char[] buffer, final int offset, final int limit) {
assert buffer.length >= limit;
assert offset <=0 && offset <= buffer.length;
assert 0 <= offset && offset <= buffer.length;
for (int i = offset; i < limit;) {
i += Character.toChars(
Character.toUpperCase(

View File

@ -32,6 +32,17 @@ import org.junit.Test;
*/
public class TestCharacterUtils extends LuceneTestCase {
public void testLowerUpper() throws IOException {
Reader reader = new StringReader("ABc");
CharacterBuffer buffer = CharacterUtils.newCharacterBuffer(3);
assertTrue(CharacterUtils.fill(buffer, reader));
assertEquals(3, buffer.getLength());
CharacterUtils.toLowerCase(buffer.getBuffer(), 1, 3);
assertEquals("Abc", new String(buffer.getBuffer()));
CharacterUtils.toUpperCase(buffer.getBuffer(), 1, 3);
assertEquals("ABC", new String(buffer.getBuffer()));
}
public void testConversions() {
final char[] orig = TestUtil.randomUnicodeString(random(), 100).toCharArray();
final int[] buf = new int[orig.length];

View File

@ -17,10 +17,10 @@ com.carrotsearch.randomizedtesting.version = 2.7.2
/com.epam/parso = 2.0.9
com.fasterxml.jackson.core.version = 2.9.9
com.fasterxml.jackson.core.version = 2.10.0
/com.fasterxml.jackson.core/jackson-annotations = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.core/jackson-core = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.core/jackson-databind = 2.9.9.3
/com.fasterxml.jackson.core/jackson-databind = ${com.fasterxml.jackson.core.version}
/com.fasterxml.jackson.dataformat/jackson-dataformat-smile = ${com.fasterxml.jackson.core.version}
/com.github.ben-manes.caffeine/caffeine = 2.8.0

View File

@ -21,7 +21,7 @@ grant {
// contain read access to only what we need:
// 3rd party jar resources (where symlinks are not supported), test-files/ resources
permission java.io.FilePermission "${common.dir}${/}-", "read";
permission java.io.FilePermission "${common-solr.dir}${/}-", "read";
permission java.io.FilePermission "${common.dir}${/}..${/}solr${/}-", "read";
// 3rd party jar resources (where symlinks are supported)
permission java.io.FilePermission "${user.home}${/}.ivy2${/}cache${/}-", "read";
// system jar resources

View File

@ -163,6 +163,8 @@ Improvements
* SOLR-11706: Add support for aggregation on multivalued fields in JSON facets. min, max, avg, sum, sumsq, stddev,
variance, percentile aggregations now have support for multivalued fields. (hossman, Munendra S N)
* SOLR-13987: Admin UI should not rely on javascript eval() (rmuir, Kevin Risden)
Optimizations
---------------------
(No changes)
@ -179,7 +181,7 @@ Bug Fixes
* SOLR-12393: Compute score if requested even when expanded docs not sorted by score in ExpandComponent.
(David Smiley, Munendra S N)
* SOLR-13877: Fix NPE in expand component when matched docs have fewer unique values. (Munendra S N)
* SOLR-13877, SOLR-7798: Robust support for ExpandComponent when used independently of CollapsingPostFilter. (Jörg Rathlev, Michael Gibney, Munendra S N)
* SOLR-13823: Fix ClassCastEx when score is requested with group.query. This also fixes score not being generated
for distributed group.query case. (Uwe Jäger, Munendra S N)
@ -210,6 +212,7 @@ Bug Fixes
* SOLR-13087: Use EUID instead of whoami to check for root in the bin/solr script (Martijn Koster via Jason Gerlowski)
* SOLR-13977: solr create -c not working under Windows 10 (janhoy)
Other Changes
---------------------
@ -234,6 +237,8 @@ Other Changes
* SOLR-13998: Add thread safety annotations to Solr. This only introduces the annotations and doesn't add these to
existing classes. (Anshum Gupta, Mark Miller)
* SOLR-13818: Upgrade jackson to 2.10.0 (marungo, Andras Salamon via Kevin Risden)
================== 8.3.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
@ -268,8 +273,6 @@ Bug Fixes
* SOLR-13941: Tests configure Jetty differently than when running via start.jar (janhoy, Uwe Schindler)
* SOLR-13977: solr create -c not working under Windows 10 (janhoy)
================== 8.3.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

View File

@ -281,7 +281,6 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
currentValues = sortedDocValues[currentContext];
segmentOrdinalMap = ordinalMap.getGlobalOrds(currentContext);
}
int count = 0;
ordBytes = new IntObjectHashMap<>();
@ -303,12 +302,12 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
currentValues.advance(contextDoc);
}
if (contextDoc == currentValues.docID()) {
int ord = currentValues.ordValue();
++count;
BytesRef ref = currentValues.lookupOrd(ord);
ord = (int)segmentOrdinalMap.get(ord);
ordBytes.put(ord, BytesRef.deepCopyOf(ref));
groupBits.set(ord);
int contextOrd = currentValues.ordValue();
int ord = (int)segmentOrdinalMap.get(contextOrd);
if (!groupBits.getAndSet(ord)) {
BytesRef ref = currentValues.lookupOrd(contextOrd);
ordBytes.put(ord, BytesRef.deepCopyOf(ref));
}
collapsedSet.add(globalDoc);
}
} else {
@ -317,22 +316,22 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
}
if (globalDoc == values.docID()) {
int ord = values.ordValue();
++count;
BytesRef ref = values.lookupOrd(ord);
ordBytes.put(ord, BytesRef.deepCopyOf(ref));
groupBits.set(ord);
if (!groupBits.getAndSet(ord)) {
BytesRef ref = values.lookupOrd(ord);
ordBytes.put(ord, BytesRef.deepCopyOf(ref));
}
collapsedSet.add(globalDoc);
}
}
}
int count = ordBytes.size();
if(count > 0 && count < 200) {
groupQuery = getGroupQuery(field, count, ordBytes);
}
} else {
groupSet = new LongHashSet(docList.size());
NumericDocValues collapseValues = contexts.get(currentContext).reader().getNumericDocValues(field);
int count = 0;
for(int i=0; i<globalDocs.length; i++) {
int globalDoc = globalDocs[i];
while(globalDoc >= nextDocBase) {
@ -353,12 +352,12 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
value = 0;
}
if(value != nullValue) {
++count;
groupSet.add(value);
collapsedSet.add(globalDoc);
}
}
int count = groupSet.size();
if(count > 0 && count < 200) {
if (fieldType.isPointField()) {
groupQuery = getPointGroupQuery(schemaField, count, groupSet);
@ -685,7 +684,8 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
int size,
LongHashSet groupSet) {
List<BytesRef> bytesRefs = new ArrayList<>(size);
BytesRef[] bytesRefs = new BytesRef[size];
int index = -1;
BytesRefBuilder term = new BytesRefBuilder();
Iterator<LongCursor> it = groupSet.iterator();
@ -693,7 +693,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
LongCursor cursor = it.next();
String stringVal = numericToString(ft, cursor.value);
ft.readableToIndexed(stringVal, term);
bytesRefs.add(term.toBytesRef());
bytesRefs[++index] = term.toBytesRef();
}
return new TermInSetQuery(fname, bytesRefs);
@ -734,11 +734,12 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
private Query getGroupQuery(String fname,
int size,
IntObjectHashMap<BytesRef> ordBytes) {
List<BytesRef> bytesRefs = new ArrayList<>(size);
BytesRef[] bytesRefs = new BytesRef[size];
int index = -1;
Iterator<IntObjectCursor<BytesRef>>it = ordBytes.iterator();
while (it.hasNext()) {
IntObjectCursor<BytesRef> cursor = it.next();
bytesRefs.add(cursor.value);
bytesRefs[++index] = cursor.value;
}
return new TermInSetQuery(fname, bytesRefs);
}

View File

@ -57,12 +57,18 @@ public class MinMaxAgg extends SimpleAggValueSource {
if (sf.multiValued() || sf.getType().multiValuedFieldCache()) {
if (sf.hasDocValues()) {
if(sf.getType().getNumberType() != null) {
if (sf.getType().isPointField()) {
FieldType.MultiValueSelector choice = minmax == 1 ? FieldType.MultiValueSelector.MIN : FieldType.MultiValueSelector.MAX;
vs = sf.getType().getSingleValueSource(choice, sf, null);
} else {
// multi-valued strings
return new MinMaxSortedSetDVAcc(fcontext, sf, numSlots);
NumberType numberType = sf.getType().getNumberType();
if (numberType != null && numberType != NumberType.DATE) {
// TrieDate doesn't support selection of single value
FieldType.MultiValueSelector choice = minmax == 1 ? FieldType.MultiValueSelector.MIN : FieldType.MultiValueSelector.MAX;
vs = sf.getType().getSingleValueSource(choice, sf, null);
} else {
return new MinMaxSortedSetDVAcc(fcontext, sf, numSlots);
}
}
} else {
if (sf.getType().isPointField()) {

View File

@ -42,6 +42,7 @@ import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.InvalidPathException;
import java.security.GeneralSecurityException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -434,6 +435,15 @@ public class SimplePostTool {
"The web mode is a simple crawler following links within domain, default delay=10s.");
}
private boolean checkIsValidPath(File srcFile) {
try {
srcFile.toPath();
return true;
} catch (InvalidPathException e) {
return false;
}
}
/** Post all filenames provided in args
* @param args array of file names
* @param startIndexInArgs offset to start
@ -446,21 +456,13 @@ public class SimplePostTool {
int filesPosted = 0;
for (int j = startIndexInArgs; j < args.length; j++) {
File srcFile = new File(args[j]);
if(srcFile.isDirectory() && srcFile.canRead()) {
boolean isValidPath = checkIsValidPath(srcFile);
if(isValidPath && srcFile.isDirectory() && srcFile.canRead()) {
filesPosted += postDirectory(srcFile, out, type);
} else if (srcFile.isFile() && srcFile.canRead()) {
} else if (isValidPath && srcFile.isFile() && srcFile.canRead()) {
filesPosted += postFiles(new File[] {srcFile}, out, type);
} else {
File parent = srcFile.getParentFile();
if(parent == null) parent = new File(".");
String fileGlob = srcFile.getName();
GlobFileFilter ff = new GlobFileFilter(fileGlob, false);
File[] files = parent.listFiles(ff);
if(files == null || files.length == 0) {
warn("No files or directories matching "+srcFile);
continue;
}
filesPosted += postFiles(parent.listFiles(ff), out, type);
filesPosted += handleGlob(srcFile, out, type);
}
}
return filesPosted;
@ -477,21 +479,13 @@ public class SimplePostTool {
reset();
int filesPosted = 0;
for (File srcFile : files) {
if(srcFile.isDirectory() && srcFile.canRead()) {
boolean isValidPath = checkIsValidPath(srcFile);
if(isValidPath && srcFile.isDirectory() && srcFile.canRead()) {
filesPosted += postDirectory(srcFile, out, type);
} else if (srcFile.isFile() && srcFile.canRead()) {
} else if (isValidPath && srcFile.isFile() && srcFile.canRead()) {
filesPosted += postFiles(new File[] {srcFile}, out, type);
} else {
File parent = srcFile.getParentFile();
if(parent == null) parent = new File(".");
String fileGlob = srcFile.getName();
GlobFileFilter ff = new GlobFileFilter(fileGlob, false);
File[] fileList = parent.listFiles(ff);
if(fileList == null || fileList.length == 0) {
warn("No files or directories matching "+srcFile);
continue;
}
filesPosted += postFiles(fileList, out, type);
filesPosted += handleGlob(srcFile, out, type);
}
}
return filesPosted;
@ -539,6 +533,28 @@ public class SimplePostTool {
return filesPosted;
}
/**
* This only handles file globs not full path globbing.
* @param globFile file holding glob path
* @param out outputStream to write results to
* @param type default content-type to use when posting (may be overridden in auto mode)
* @return number of files posted
*/
int handleGlob(File globFile, OutputStream out, String type) {
int filesPosted = 0;
File parent = globFile.getParentFile();
if (parent == null) parent = new File(".");
String fileGlob = globFile.getName();
GlobFileFilter ff = new GlobFileFilter(fileGlob, false);
File[] fileList = parent.listFiles(ff);
if (fileList == null || fileList.length == 0) {
warn("No files or directories matching " + globFile);
} else {
filesPosted = postFiles(fileList, out, type);
}
return filesPosted;
}
/**
* This method takes as input a list of start URL strings for crawling,
* adds each one to a backlog and then starts crawling

View File

@ -352,6 +352,19 @@ public class TestExpandComponent extends SolrTestCaseJ4 {
"/response/lst[@name='expanded']/result[@name='2000.0']/doc[1]/str[@name='id'][.='7']",
"count(//*[@name='score'])=0"
);
// Support expand enabled without previous collapse
assertQ(req("q", "type_s:child", "sort", group+" asc, test_l desc", "defType", "edismax",
"expand", "true", "expand.q", "type_s:parent", "expand.field", group),
"*[count(/response/result/doc)=4]",
"*[count(/response/lst[@name='expanded']/result)=2]",
"/response/result/doc[1]/str[@name='id'][.='7']",
"/response/result/doc[2]/str[@name='id'][.='2']",
"/response/result/doc[3]/str[@name='id'][.='8']",
"/response/result/doc[4]/str[@name='id'][.='6']",
"/response/lst[@name='expanded']/result[@name='1"+floatAppend+"']/doc[1]/str[@name='id'][.='1']",
"/response/lst[@name='expanded']/result[@name='2"+floatAppend+"']/doc[1]/str[@name='id'][.='5']"
);
}
@Test

View File

@ -42,9 +42,8 @@ import org.junit.Test;
*/
public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributedSearchTestCase {
// TODO: add hll & variance - update all assertions to test their values (right after any mention of 'stddev')
private static List<String> ALL_STATS = Arrays.asList("min", "max", "sum", "stddev", "avg", "sumsq", "unique",
"missing", "countvals", "percentile");
"missing", "countvals", "percentile", "variance", "hll");
private final String STAT_FIELD;
private String ALL_STATS_JSON = "";
@ -236,8 +235,12 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute
assertEquals(1.0D, bucket.get("percentile"));
assertEquals(0.475247524752475D, (double) bucket.get("avg"), 0.1E-7);
assertEquals(54.0D, (double) bucket.get("sumsq"), 0.1E-7);
// assertEquals(0.55846323792D, bucket.getStddev(), 0.1E-7); // TODO: SOLR-11725
// assertEquals(0.55846323792D, (double) bucket.get("stddev"), 0.1E-7); // TODO: SOLR-11725
// assertEquals(0.3118811881D, (double) bucket.get("variance"), 0.1E-7); // TODO: SOLR-11725
assertEquals(0.55569169111D, (double) bucket.get("stddev"), 0.1E-7); // json.facet is using the "uncorrected stddev"
assertEquals(0.3087932556D, (double) bucket.get("variance"), 0.1E-7); // json.facet is using the "uncorrected variance"
assertEquals(3L, bucket.get("unique"));
assertEquals(3L, bucket.get("hll"));
}
@ -397,7 +400,11 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute
assertEquals(115.5D, (double) aaa0_Bucket.get("avg"), 0.1E-7);
assertEquals(1.674585E7D, (double) aaa0_Bucket.get("sumsq"), 0.1E-7);
// assertEquals(206.4493184076D, (double) aaa0_Bucket.get("stddev"), 0.1E-7); // TODO: SOLR-11725
// assertEquals(42621.32107023412D, (double) aaa0_Bucket.get("variance"), 0.1E-7); // TODO: SOLR-11725
assertEquals(206.1049489944D, (double) aaa0_Bucket.get("stddev"), 0.1E-7); // json.facet is using the "uncorrected stddev"
assertEquals(42479.25D, (double) aaa0_Bucket.get("variance"), 0.1E-7); // json.facet is using the "uncorrected variance"
assertEquals(284L, aaa0_Bucket.get("unique"));
assertEquals(284L, aaa0_Bucket.get("hll"));
NamedList tail_Bucket = foo_buckets.get(5);
assertEquals(ALL_STATS.size() + 3, tail_Bucket.size()); // val,count,facet
@ -412,7 +419,11 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute
assertEquals(22.0D, (double) tail_Bucket.get("avg"), 0.1E-7);
assertEquals(58740.0D, (double) tail_Bucket.get("sumsq"), 0.1E-7);
// assertEquals(13.0599310011D, (double) tail_Bucket.get("stddev"), 0.1E-7); // TODO: SOLR-11725
// assertEquals(170.5617977535D, (double) tail_Bucket.get("variance"), 0.1E-7); // TODO: SOLR-11725
assertEquals(12.9871731592D, (double) tail_Bucket.get("stddev"), 0.1E-7); // json.facet is using the "uncorrected stddev"
assertEquals(168.666666667D, (double) tail_Bucket.get("variance"), 0.1E-7); // json.facet is using the "uncorrected variance"
assertEquals(45L, tail_Bucket.get("unique"));
assertEquals(45L, tail_Bucket.get("hll"));
List<NamedList> tail_bar_buckets = (List) ((NamedList)tail_Bucket.get("bar")).get("buckets");
@ -429,7 +440,11 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute
assertEquals(37.5D, (double) tailB_Bucket.get("avg"), 0.1E-7);
assertEquals(16910.0D, (double) tailB_Bucket.get("sumsq"), 0.1E-7);
// assertEquals(1.78376517D, (double) tailB_Bucket.get("stddev"), 0.1E-7); // TODO: SOLR-11725
// assertEquals(3.1818181817D, (double) tailB_Bucket.get("variance"), 0.1E-7); // TODO: SOLR-11725
assertEquals(1.70782513D, (double) tailB_Bucket.get("stddev"), 0.1E-7); // json.facet is using the "uncorrected stddev"
assertEquals(2.9166666747D, (double) tailB_Bucket.get("variance"), 0.1E-7); // json.facet is using the "uncorrected variance"
assertEquals(6L, tailB_Bucket.get("unique"));
assertEquals(6L, tailB_Bucket.get("hll"));
// check the SKG stats on our tailB bucket
NamedList tailB_skg = (NamedList) tailB_Bucket.get("skg");

View File

@ -1407,19 +1407,17 @@ public class TestJsonFacets extends SolrTestCaseHS {
// Same thing for dates
// test min/max of string field
if (date.equals("date_dt") || date.equals("date_dtd")) { // supports only single valued currently... see SOLR-11706
client.testJQ(params(p, "q", "*:*"
, "json.facet", "{" +
" f3:{${terms} type:field, field:${num_is}, facet:{a:'min(${date})'}, sort:'a desc' }" +
",f4:{${terms} type:field, field:${num_is}, facet:{a:'max(${date})'}, sort:'a asc' }" +
"}"
)
, "facets=={count:6 " +
",f3:{ buckets:[{val:-1,count:2,a:'2002-02-02T02:02:02Z'},{val:3,count:2,a:'2002-02-02T02:02:02Z'},{val:0,count:2,a:'2001-02-03T01:02:03Z'},{val:-5,count:1,a:'2001-01-01T01:01:01Z'},{val:2,count:1,a:'2001-01-01T01:01:01Z'} ] } " +
",f4:{ buckets:[{val:-5,count:1,a:'2001-01-01T01:01:01Z'},{val:2,count:1,a:'2001-01-01T01:01:01Z'},{val:-1,count:2,a:'2002-03-01T03:02:01Z'},{val:0,count:2,a:'2003-03-03T03:03:03Z'},{val:3,count:2,a:'2003-03-03T03:03:03Z'} ] } " +
"}"
);
}
client.testJQ(params(p, "q", "*:*"
, "json.facet", "{" +
" f3:{${terms} type:field, field:${num_is}, facet:{a:'min(${date})'}, sort:'a desc' }" +
",f4:{${terms} type:field, field:${num_is}, facet:{a:'max(${date})'}, sort:'a asc' }" +
"}"
)
, "facets=={count:6 " +
",f3:{ buckets:[{val:-1,count:2,a:'2002-02-02T02:02:02Z'},{val:3,count:2,a:'2002-02-02T02:02:02Z'},{val:0,count:2,a:'2001-02-03T01:02:03Z'},{val:-5,count:1,a:'2001-01-01T01:01:01Z'},{val:2,count:1,a:'2001-01-01T01:01:01Z'} ] } " +
",f4:{ buckets:[{val:-5,count:1,a:'2001-01-01T01:01:01Z'},{val:2,count:1,a:'2001-01-01T01:01:01Z'},{val:-1,count:2,a:'2002-03-01T03:02:01Z'},{val:0,count:2,a:'2003-03-03T03:03:03Z'},{val:3,count:2,a:'2003-03-03T03:03:03Z'} ] } " +
"}"
);
// test field faceting on date field
client.testJQ(params(p, "q", "*:*"
@ -1784,17 +1782,15 @@ public class TestJsonFacets extends SolrTestCaseHS {
" } }"
);
if (where_s.equals("where_s") || where_s.equals("where_sd")) { // min/max only supports only single valued currently... see SOLR-11706
client.testJQ(params(p, "q", "*:*"
, "json.facet", "{f:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ wmin:'min(${where_s})', wmax:'max(${where_s})' } }}"
)
, "facets=={count:6, f:{buckets:[ {val:-5.0,count:1,wmin:NY,wmax:NY}, {val:0.0,count:2,wmin:NJ,wmax:NY}, {val:5.0,count:0}]" +
" ,before:{count:1,wmin:NJ,wmax:NJ}" +
" ,after:{count:1,wmin:NJ,wmax:NJ} " +
" ,between:{count:3,wmin:NJ,wmax:NY} " +
" } }"
);
}
client.testJQ(params(p, "q", "*:*"
, "json.facet", "{f:{type:range, field:${num_d}, start:-5, end:10, gap:5, other:all, facet:{ wmin:'min(${where_s})', wmax:'max(${where_s})' } }}"
)
, "facets=={count:6, f:{buckets:[ {val:-5.0,count:1,wmin:NY,wmax:NY}, {val:0.0,count:2,wmin:NJ,wmax:NY}, {val:5.0,count:0}]" +
" ,before:{count:1,wmin:NJ,wmax:NJ}" +
" ,after:{count:1,wmin:NJ,wmax:NJ} " +
" ,between:{count:3,wmin:NJ,wmax:NY} " +
" } }"
);
// stats at top level
client.testJQ(params(p, "q", "*:*"

View File

@ -0,0 +1 @@
e01cfd93b80d6773b3f757c78e756c9755b47b81

View File

@ -1 +0,0 @@
2ea299c145207161c212e28abbc8f513fa245940

View File

@ -0,0 +1 @@
4e2c5fa04648ec9772c63e2101c53af6504e624e

View File

@ -1 +0,0 @@
bfff5af9fb8347d26bbb7959cb9b4fe9a2b0ca5e

View File

@ -0,0 +1 @@
1127c9cf62f2bb3121a3a2a0a1351d251a602117

View File

@ -1 +0,0 @@
68ddd453458765757fd3ffca9437f9a42d91003e

View File

@ -0,0 +1 @@
e761e9b93d2da05e5ea1bc4deff1d75cb13b106b

View File

@ -1 +0,0 @@
85749406c69b08945d6059db679cc66990340ebc

View File

@ -95,7 +95,19 @@
<New class="org.eclipse.jetty.rewrite.handler.HeaderPatternRule">
<Set name="pattern">*</Set>
<Set name="name">Content-Security-Policy</Set>
<Set name="value">default-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; img-src 'self'; media-src 'self'; font-src 'self'; connect-src 'self';</Set>
<Set name="value">
default-src 'none';
base-uri 'none';
connect-src 'self';
form-action 'self';
font-src 'self';
frame-ancestors 'none';
img-src 'self';
media-src 'self';
style-src 'self' 'unsafe-inline';
script-src 'self';
worker-src 'self';
</Set>
</New>
</Arg>
</Call>

View File

@ -0,0 +1,41 @@
/*
The MIT License
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/**
* @license AngularJS v1.3.8
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
/* Include this file in your html if you are using the CSP mode. */
@charset "UTF-8";
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
.ng-cloak, .x-ng-cloak,
.ng-hide:not(.ng-hide-animate) {
display: none !important;
}
ng\:form {
display: block;
}

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html ng-app="solrAdminApp">
<html ng-app="solrAdminApp" ng-csp>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@ -23,6 +23,7 @@ limitations under the License.
<link rel="icon" type="image/x-icon" href="img/favicon.ico?_=${version}">
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/angular-csp.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/common.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/analysis.css?_=${version}">
<link rel="stylesheet" type="text/css" href="css/angular/cloud.css?_=${version}">

View File

@ -299,7 +299,7 @@ solrAdminApp.config([
scope.$watch("data", function(newValue, oldValue) {
if (newValue) {
var treeConfig = {
"plugins" : [ "themes", "json_data", "ui" ],
"plugins" : [ "json_data", "ui" ],
"json_data" : {
"data" : scope.data,
"progressive_render" : true

View File

@ -668,7 +668,7 @@ var graphSubController = function ($scope, Zookeeper) {
}
Zookeeper.clusterState(params, function (data) {
eval("var state=" + data.znode.data); // @todo fix horrid means to parse JSON
var state = $.parseJSON(data.znode.data);
var leaf_count = 0;
var graph_data = {