Hi Vinay, you would like to ideally identify the best field for terms or sequences of terms. e.g. "Brian marketing" Brian -> author marketing -> topic
If the query is structured, that's easy, you don't even need the edismax to parse it and you can directly build your lucene language query, as you like (mm won't matter at that point). My assumption is that your query is unstructured and you are using the edismax to parse your ideal multi-field query. How the edismax treats multi-field queries is tricky. I wrote a blog post recently that may be useful: https://sease.io/2021/05/apache-solr-sow-parameter-split-on-whitespace-and-multi-field-full-text-search.html FIxed a bug with mm and edismax recently : https://github.com/apache/solr/pull/158 I am working on a new query parser specifically designed for multi field search, keep an eye on the solr updates and our blog. You will notice mm is mostly 'per document' (and it switches to 'per field' not with an easy control). So you won't directly be able to specify a different mm per field (unless you structure your query beforehand in Lucene query language). If you keep mm=1 and boost=topic:<your query terms in AND>, you will get similar behavior to what you need: 1) Is there any way to just override mm(=1) for the author field and keep mm = 100% for all other fields? mm=1&boost=topic:(term1 AND term2 AND term3)&boost=title:(term1 AND term2 AND term3) means in the matching phase you need at least 1 query term in *the document.* *Then top ranking results will be the one matching all query terms* Additionally, you may find useful to use the phrase fields (including the ngrams ones) : pf, pf1, pf2 (they build a stricter boost policy based on phrases and shingles) Cheers -------------------------- Alessandro Benedetti Apache Lucene/Solr Committer Director, R&D Software Engineer, Search Consultant www.sease.io On Sun, 20 Jun 2021 at 21:15, Vinay Rajput <vinayrajput4...@gmail.com> wrote: > Hi All, > > We are using Solr 7.3.1 in PROD and have a few thousand blogs indexed in > Solr along with other types of documents. I am working on a requirement > where we need to give more weight to the author field if someone is > searching for "Author name + topic". > > For example, let's say we have three fields - author, title, text. If we > search "Brian marketing" then those "marketing" blogs where "Brian" is the > author should be ranked higher than other blogs where "Brian" is mentioned > in either title or text fields. > > In order to achieve this, I thought of giving more weight to the author > field. This looks ok but I also had to update mm (minimum match) > parameter from 100% to 1 in solrconfig.xml file otherwise the author field > wouldn't even be matched in case of phrase queries. Now as a side effect of > this mm change, total hit count has increased dramatically which affects > precision. > I did something like this in solrconfig.xml, I tried to use conditional mm > to minimize the impact of this change for other fields especially in case > of larger phrase query :- > > <str name="defType">edismax</str> > > <str name="qf">title^2 author^3 text</str> > > <str name="mm">1<50% 4<-1</str> > > <str name="tie">0.1</str> > > Now, here are my questions :- > 1) Is there any way to just override mm(=1) for the author field and keep > mm = 100% for all other fields? > 2) Is my approach correct? Is there any better way to achieve the desired > result? > > Thanks in advance. > > Regards, > Vinay >