我正在尝试这样做:
http://solr:8080/solr/select/?q=name_make:[make]+name_model:[model]&rows=10000&wt=json&fq={!tag=dt}name_model:[model]&facet=on&facet.field={!ex=dt}name_model&facet.sort=count&facet.field.mincount=1
使用 solr.net - 我有这个:
var multipleQuery = new SolrMultipleCriteriaQuery(queryList, "AND");
var Facets = new FacetParameters();
Facets.Queries.Add(new SolrFacetFieldQuery(new LocalParams{{"ex", "dt"}} +"name_model") { MinCount = 1, Sort = true});
List<ISolrQuery> filter = new List<ISolrQuery>();
filter.Add(new LocalParams { { "tag", "dt" }, { "mincount", "1" } } + Query.Field("name_model").Is(NameModel));
var result = solr.Query(multipleQuery, new QueryOptions
{
FilterQueries = filter,
Rows = rows,
Facet = facets,
Start = index
});
我期待类似的东西
- 制作 1 [ ] 101
- 制作 2 [ ] 144
- 制作 3 [x] 232
- 使 2 [ ] 32
但只能得到
- 制作 3 [x] 232
从我的踪迹我看到
- Solr q (name_make:[make] AND name_model:[model] AND price:[0 TO 250000] AND year_registration:[0 TO 10000000]) 0,023619 0,000006
- Solr fq {!tag=dt mincount=1}name_model:A3
我错过了一块,还是走错了路?