facet

Does solr has API to read solr schema.xml?

回眸只為那壹抹淺笑 提交于 2019-12-10 13:21:58
问题 Is there any solr api to read the solr schema.xml? The reason I need it is that solr facet is not backward compatible. If the index doesn't define field A, but the program tries to generate facet for field A, all the facets will fail.Therefore I need to check in the runtime what index fields do we have in the index and generate the facets dynamically. 回答1: You can get the schema with http://localhost:8983/solr/admin/file/?contentType=text/xml;charset=utf-8&file=schema.xml It's the raw xml, so

ggplot facet_wrap with specific order of variables in each facet

最后都变了- 提交于 2019-12-10 11:06:44
问题 I would like to plot these data with ggplot: library(ggplot2) set.seed(0) df <- data.frame( var1 = rep(c("group1", "group2"), each = 3), var2 = rep(letters[1:3], 2), value = runif(6, 0, 10) ) The plot should be faceted like this: pl <- ggplot(df, aes(var2, value)) pl <- pl + geom_col() pl <- pl + facet_wrap(~ var1, scales = "free") pl The order of var2 on the x-axis should be determined by increasing order of value . I could achieve this doing: df$temp_var <- paste(df$var1, df$var2) pl <-

geom_raster faceted plot with ggplot2: control row height

蓝咒 提交于 2019-12-10 10:35:31
问题 In the example below I have a dataset containing two experiments F1 and F2. A classification is performed based on F1 signal, and both F1 and F2 values are ordered accordingly. In this diagram, each facet has the same dimension although the number of rows is not the same ( e.g class #7 contains only few elements compare to the other classes). I would like to modify the code to force row height to be the same across facets (facets would thus have various blank space below). Any hints would be

Get same height for plots having different facet numbers, and coord_fixed?

一曲冷凌霜 提交于 2019-12-09 17:33:20
问题 Let me explain in pictures what I mean: set.seed(1) ## dummy data.frame: df <- data.frame( value1 = sample(5:15, 20, replace = T), value2 = sample(5:15, 20, replace = T), var1 = c(rep('type1',10), rep('type2',10)), var2 = c('a','b','c','d')) ## Plot 1 ggplot() + geom_point(data = df, aes(value1, value2)) + facet_grid(~var1) + coord_fixed() ggsave("plot_2facet.pdf", height=5, units = 'in') #Saving 10.3 x 5 in image ## Plot 2 which I want to save in a separate file (!) ggplot() + geom_point

Indexing Fields with SOLR and LowerCaseFilterFactory

蓝咒 提交于 2019-12-09 15:32:28
问题 I have a Field defined as <fieldType name="text_ws_lc" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type="query"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter

SOLR is slow at first facet query but quite fast for later queries

假装没事ソ 提交于 2019-12-09 07:18:35
问题 I'm trying to figure out why my SOLR (4.1 )instance is extremely slow for facet queries. The index has approximately 200M documents and the server has 64GB RAM. My query looks like this: q=CampaignId:1462%0ASourceDateUtc:[2014-01-01T00:00:00.000Z TO 2014-01-30T00:00:00.000Z] &wt=xml&indent=true&rows=0 &facet=true&facet.field=UserName&facet.mincount=10&facet.method=fc It would take like 6 minutes for the first hit but when the result comes back, I search again with the same query or slightly

ggplot2 stat_function with calculated argument for different data subset inside a facet_grid

帅比萌擦擦* 提交于 2019-12-09 06:59:47
问题 I have a follow up question to how to pass fitdistr calculated args to stat_function (see here for context). My data frame is like that (see below for full data set): > str(small_data) 'data.frame': 1032 obs. of 3 variables: $ Exp: Factor w/ 6 levels "1L","2L","3L",..: 1 1 1 1 1 1 1 1 1 1 ... $ t : num 0 0 0 0 0 0 0 0 0 0 ... $ int: num 75.7 86.1 76.3 82.3 98.3 ... I would like to plot a facet_grid grouped by Exp and t showing the density histogram of int as well as plot the fitted log-normal

ArangoDB Faceted Search Performance

纵然是瞬间 提交于 2019-12-08 19:36:31
问题 We are evaluating ArangoDB performance in space of facets calculations. There are number of other products capable of doing the same, either via special API or query language: MarkLogic Facets ElasticSearch Aggregations Solr Faceting etc We understand, there is no special API in Arango to calculate factes explicitly. But in reality, it is not needed, thanks for a comprehensive AQL it can be easily achieved via simple query, like: FOR a in Asset COLLECT attr = a.attribute1 INTO g RETURN {

ElasticSearch post_filter and filtered aggregations not behaving the same way

﹥>﹥吖頭↗ 提交于 2019-12-08 16:15:14
问题 I've been spending a whole week on this with no hope of solving it. I am following this (quite old) article on e-commerce search and faceted filtering, etc., and it's working good so far (the search results are great and the aggregations work great when the filters are applied IN the query. I am using ElasticSearch 6.1.1. But because I want to allow my users to perform multiple selections on the facets, I've moved the filters into the post_filter section. This still works well , it's

how to display text on several lines with geom_text in faceting wrap

怎甘沉沦 提交于 2019-12-08 08:09:52
问题 This is my df : df <- data.frame(annee = rep(c(2003,2004), times = 1, each = 3), sps = c("a", "b", "c"), nb = 1:3) I create a column containing my labels : df$labels <- paste("nb", df$sps, "=", df$nb) Then I do my plot : ggplot(df, aes(nb)) + geom_density(aes(fill = sps, colour = sps), alpha = 0.1) + facet_wrap(~ annee) + geom_text(data=df, aes(x=8, y=2.5, label= labels), colour="black", inherit.aes=FALSE, parse=FALSE) But I have a problem with my text in each facet : I would like to have 3