Solrnet query for Minimum Should Match(mm)

306 views Asked by At

I am working on Solr version 4.10.2 with ASP.NET MVC.

I have performed one query in Solr like this:

http://localhost:8983/solr/MyCoreName/select?q=red+sony+mobile+bluetooth+&wt=json&indent=true&defType=edismax&mm=50%25&stopwords=true&lowercaseOperators=true

Update

I have performed a query with queryoptions like below:

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 },
                            };

Then I use this options with below query in which I use LocalParams. Is there any mistake? Is LocalParams and ExtraParams works together?

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);

How can I achieve this from my application using SolrNet? Using which parameter?

Please Advice!

0

There are 0 answers