Forgot the relevent documentation... https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+Parser https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser
: Date: Tue, 7 Jul 2015 13:57:25 -0700 (MST) : From: Chris Hostetter <hossman_luc...@fucit.org> : To: solr-user@lucene.apache.org : Subject: Re: Solr edismax always using the default fields? : : : according to hte echParams output, you aren't specifying a "q" param. : : You seem to be trying to specify your query input using the "q.alt" param : -- but the q.alt param doesn't use the edismax parser specified by the : defType param -- q.alt is a feature *of* the edismax parser that is used : to completley override all of the options used to configure edismax when : there is no "q" param, and it (by default) uses the defualt solr parser. : : (the intended usecase is along the lines of "if the user doesn't specify a : query string, default to a search for all the books for sale via : 'q.alt=inStock:true'") : : stop configuring a q.alt that matches you authors name, and instead : specify a default "q" param (or enture your client always sends a "q" : param) and see if that solves things for you. : : : : Date: Tue, 7 Jul 2015 10:55:24 -0700 (MST) : : From: Paden <rumsey...@gmail.com> : : Reply-To: solr-user@lucene.apache.org : : To: solr-user@lucene.apache.org : : Subject: Solr edismax always using the default fields? : : : : Hello, : : : : I'm trying to tune a search handler to get the results that I want. In the : : solrconfig.xml I specify several different query fields for the edismax : : query parser but it always seems to use the default fields instead. : : : : For example and clarification, when I remove Author from the "df" list of : : fields the search results do not come up with the author I was looking for. : : But when I add Author back in as a "df" it returns 19/20 of his documents as : : the top search results. I guess I'm really confused because when you specify : : the query fields solr shouldn't use those default fields. I guess it's not a : : real super problem because I can define all the fields I need as defaults. : : I'm just trying to figure out where I'm going wrong here. Is there a reason : : that this would happen? I have the search handler xml below : : : : <requestHandler name="/select" class="solr.SearchHandler"> : : : : <lst name="defaults"> : : <str name="echoParams">all</str> : : <str name="defType">edismax</str> : : <str name="df">Author</str> <------ADDING THIS GIVES DESIRED RESULT, : : REMOVING BAD-- : : <str name="df">text</str> -----RESULT. NOTHING ELSE CHANGES : : <str name="qf">text^0.5 Title^1.2 Author^2.0</str> : : <str name="rows">20</str> : : <str name="q.alt">*some author name*</str> : : </lst> : : : : </requestHandler> : : : : And here is the echoed params of the search : : : : "responseHeader": { : : "status": 0, : : "QTime": 48, : : "params": { : : "lowercaseOperators": "true", : : "df": [ : : "Author", : : "text" : : ], : : "echoParams": "all", : : "indent": "true", : : "qf": "text^0.5 Title^1.2 Author^2.0", : : "_": "1436291181730", : : "q.alt": "*some author name*", : : "stopwords": "true", : : "wt": "json", : : "defType": "edismax", : : "rows": "20" : : } : : : : : : : : -- : : View this message in context: http://lucene.472066.n3.nabble.com/Solr-edismax-always-using-the-default-fields-tp4216204.html : : Sent from the Solr - User mailing list archive at Nabble.com. : : : : -Hoss : http://www.lucidworks.com/ : -Hoss http://www.lucidworks.com/