This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"result-set":{ | |
"docs":[{ | |
"scaledFileSize":0.2936695840712622, | |
"filesSize":38531.360828784695, | |
"response":809.7066204873681} | |
,{ | |
"scaledFileSize":0.24781721938679732, | |
"filesSize":38191.027438877834, | |
"response":781.071825096071} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"responseHeader":{ | |
"zkConnected":true, | |
"status":0, | |
"QTime":3, | |
"params":{ | |
"q":"*:*", | |
"expand":"true", | |
"indent":"true", | |
"fl":"stock_s", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"responseHeader":{ | |
"zkConnected":true, | |
"status":0, | |
"QTime":4, | |
"params":{ | |
"q":"*:*", | |
"expand":"true", | |
"indent":"true", | |
"fl":"stock_s,id", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"responseHeader":{ | |
"zkConnected":true, | |
"status":0, | |
"QTime":185, | |
"params":{ | |
"facet.limit":"-1", | |
"q":"*:*", | |
"facet.field":["f1_s", | |
"f2_s", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.io.*; | |
import org.apache.solr.client.solrj.impl.*; | |
import org.apache.solr.client.solrj.*; | |
import org.apache.solr.common.util.*; | |
import org.apache.solr.client.solrj.response.*; | |
import org.apache.solr.common.params.*; | |
public class CollapseQuery { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.solr.client.solrj.impl.CloudSolrClient; | |
import org.apache.solr.client.solrj.impl.HttpSolrClient; | |
import org.apache.solr.client.solrj.SolrClient; | |
import org.apache.solr.client.solrj.request.UpdateRequest; | |
import org.apache.solr.common.SolrInputDocument; | |
import java.util.Random; | |
import java.util.Date; | |
import java.util.UUID; | |
import java.io.*; | |
import org.apache.commons.math3.distribution.NormalDistribution; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Collapses groups that have been block indexed. | |
*/ | |
private static class BlockOrdScoreCollector extends DelegatingCollector { | |
private int currentGroup = -1; | |
private float topScore = Float.MIN_VALUE; | |
private int topDoc = -1; | |
private ScoreAndDoc dummy = new ScoreAndDoc(); | |
private String collapseField; | |
private SortedDocValues segmentValues; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the admin password: | |
curl -X POST -H "Content-type:application/json" -d '{"password":"password123"}' "http://localhost:6764/api" | |
Add role with authorities: | |
curl -u admin:password123 -X POST -H 'Content-type: application/json' -d | |
'{"name":"test", "permissions":[{"methods":["GET"],"path":"/catalog/fusion/assets/**"}, | |
{"methods":["POST"],"path":"/api/apollo/catalog/fusion/query"}]}' http://localhost:6764/api/roles | |
Add user with role: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plist(parallel(workerCollection, | |
numWorkers="1", | |
sort="year asc, month asc, day asc", | |
plist(facet(week1, zkHost="zk1", q="*:*", buckets="year, month, day", bucketSorts="year asc, month asc, day asc", count(*)), | |
facet(week2, zkHost="zk1", q="*:*", buckets="year, month, day", bucketSorts="year asc, month asc, day asc", count(*)), | |
facet(week3, zkHost="zk1", q="*:*", buckets="year, month, day", bucketSorts="year asc, month asc, day asc", count(*)))), | |
parallel(workerCollection, | |
numWorkers="1", | |
sort="year asc, month asc, day asc", | |
plist(facet(week4, zkHost="zk2", q="*:*", buckets="year, month, day", bucketSorts="year asc, month asc, day asc", count(*)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plist(facet(collection1, q="stock_s:(1 2 3)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)), | |
facet(collection1, q="stock_s:(4 5 6)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)), | |
facet(collection1, q="stock_s:(7 8 9)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d))) |
NewerOlder