[
https://issues.apache.org/jira/browse/SOLR-3534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295296#comment-13295296
]
David Smiley commented on SOLR-3534:
------------------------------------
Hoss, I like your suggestion of refactoring this to SolrPluginUtils (not *Tools
which doesn't exist). And also I realized that SolrParams.get() takes a 2nd
arg for the default which can be s.getDefaultSearchFieldName(), simplifying
this even more.
bq. As Bernd noted, that test was written at a time when the schema.xml used by
the test had a <defaultSearchField/> declared – that was/is the entire point of
the test: that the Dismax(Handler|QParser) could work with a
"<defaultSearchField/>" and a "q" and no other params specified. As long as
"<defaultSearchField/>" is legal (even if it's deprecated and not mentioned in
the example schema.xml) a test like that should exist somewhere shouldn't it?
(if/when "<defaultSearchField/>" is no longer legal, then certainly change the
test to add a "df" param and assert that it fails if one isn't specified)
I'm confused by this, especially since you "+1"'ed on throwing an exception.
I'll presume that you don't mean "<defaultSearchField/>" literally, you mean
"<defaultSearchField>text</defaultSearchField/>". So are you effectively
saying that schema-minimal.xml should add a defaultSearchField to it?
> dismax and edismax should default to "df" when "qf" is absent.
> --------------------------------------------------------------
>
> Key: SOLR-3534
> URL: https://issues.apache.org/jira/browse/SOLR-3534
> Project: Solr
> Issue Type: Improvement
> Components: query parsers
> Affects Versions: 4.0
> Reporter: David Smiley
> Assignee: David Smiley
> Priority: Minor
> Attachments:
> SOLR-3534_dismax_and_edismax_should_default_to_df_if_qf_is_absent.patch
>
>
> The dismax and edismax query parsers should default to "df" when the "qf"
> parameter is absent. They only use the defaultSearchField in schema.xml as a
> fallback now.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]