Skip to content

Commit

Permalink
copy queryFields logic from ExtendedDismaxQParser, because the field …
Browse files Browse the repository at this point in the history
…became private in Solr 3.6.1. Should fix #1
  • Loading branch information
nolanlawson committed Jan 5, 2013
1 parent 00b3813 commit 42a5f1b
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -477,10 +477,17 @@ private List<String> buildUpAlternateQueries(List<List<TextInQuery>> textsInQuer
* @return
*/
private List<Query> createSynonymQueries(SolrParams solrParams, List<String> alternateQueryTexts) {

//
// begin copied code from ExtendedDismaxQParser
//
//

// have to build up the queryFields again because in Solr 3.6.1 they made it private.
Map<String,Float> queryFields = SolrPluginUtils.parseFieldBoosts(solrParams.getParams(DisMaxParams.QF));
if (0 == queryFields.size()) {
queryFields.put(req.getSchema().getDefaultSearchFieldName(), 1.0f);
}

float tiebreaker = solrParams.getFloat(DisMaxParams.TIE, 0.0f);
int qslop = solrParams.getInt(DisMaxParams.QS, 0);
ExtendedSolrQueryParser up = new ExtendedSolrQueryParser(this,
Expand Down

0 comments on commit 42a5f1b

Please sign in to comment.