lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2724) Deprecate defaultSearchField and defaultOperator defined in schema.xml
Date Mon, 11 Jun 2012 20:43:43 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13293054#comment-13293054
] 

David Smiley commented on SOLR-2724:
------------------------------------

Bernd:
Support for a default search field name still exists mostly for compatibility, and in perhaps
some peoples' views as a matter of preference.  It wasn't actually required before its deprecation.
 I thought it was only the fallback for parsing a lucene query but you indeed point out dismax
has it as a fallback for 'qf', and it's used by the highligher as a fallback for  'hl.fl'
although it appears the highlighter consults 'df' too.  The main point behind its deprecation
is that I think you should be explicit in a request which field(s) apply to what query strings
or other features because the schema (schema.xml) can't know.  The same applies to the default
query operator which is even more of an odd duck sitting in schema.xml.

Bernd, simply define "qf" in your request handler definition to make Solr respond correctly
to the same queries you had before.  Arguably, Dismax/Edismax should consult "df" as a default
when "qf" isn't specified.  I created SOLR-3534 for this issue.
                
> Deprecate defaultSearchField and defaultOperator defined in schema.xml
> ----------------------------------------------------------------------
>
>                 Key: SOLR-2724
>                 URL: https://issues.apache.org/jira/browse/SOLR-2724
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis, search
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: 3.6, 4.0
>
>         Attachments: SOLR-2724_deprecateDefaultSearchField_and_defaultOperator.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I've always been surprised to see the <defaultSearchField> element and <solrQueryParser
defaultOperator="OR"/> defined in the schema.xml file since the first time I saw them.
 They just seem out of place to me since they are more query parser related than schema related.
But not only are they misplaced, I feel they shouldn't exist. For query parsers, we already
have a "df" parameter that works just fine, and explicit field references. And the default
lucene query operator should stay at OR -- if a particular query wants different behavior
then use q.op or simply use "OR".
> <similarity> Seems like something better placed in solrconfig.xml than in the schema.

> In my opinion, defaultSearchField and defaultOperator configuration elements should be
deprecated in Solr 3.x and removed in Solr 4.  And <similarity> should move to solrconfig.xml.
I am willing to do it, provided there is consensus on it of course.

--
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message