我正在使用ASP.NET MVC处理Solr版本4.10.2。
我在Solr中执行了一个查询,如下所示:
http://localhost:8983/solr/MyCoreName/select?q=red+sony+mobile+bluetooth+&wt=json&indent=true&defType=edismax&mm=50%25&stopwords=true&lowercaseOperators=true
更新
我使用如下的queryoptions执行了查询:
options = new QueryOptions
{
Rows = pageSize,
Start = (pageIndex - 1) * pageSize,
FilterQueries = _solrQuery.ToArray(),
Facet = new FacetParameters
{
Queries = _solr.ToArray(),
MinCount = 1,
},
ExtraParams = new Dictionary<string, string>
{
{"qt", "edismax"},
{"mm","100%"}
},
SpellCheck = new SpellCheckingParameters { Query = keyword, Collate = true },
};
然后我在下面的查询中使用此选项,其中我使用LocalParams。有什么错吗? LocalParams和ExtraParams一起工作吗?
private static ISolrOperations<MyClass> solr;
SolrQueryResults<MyClass> Results = new SolrQueryResults<MyClass>();
Results = solr.Query(new LocalParams { { "type", "edismax" }, { "qf", "Name^" + nameWeight + " Field1^" + Field1Weight + " Field2^" + Field2Weight " }, { "bq", "InStock:true^"+ flag }} + new SolrQuery(keyword), options);
如何使用SolrNet从我的应用程序中实现这一目标?使用哪个参数?
请建议!