我試圖做到這一點:查詢Solr的(Solr.net)多條件查詢和localparams
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:使] AND name_model:[模型] AND價:[0 TO 250000] AND year_registration:0〜10000000])0,023619 0,000006
- Solr的FQ name_model {標籤= DT mincount = 1!}:A3
我失去了一塊,還是繞了錯誤的方式?