I'm looking at IndexSchema and want to get the name of the default
search field name, so I take a look at
IndexSchema.getDefaultSearchFieldName() and the javadocs deprecation
says:
@deprecated use getSolrQueryParser().getField() //which should
really be getSolrQueryParser(null).getField()
Then, when I look at the IndexSchema.getSolrQueryParser(), it takes in
the name of the default field, or null if you want the one from the
schema.
Then, in looking at the constructor used for the SolrQueryParser, it
then does:
super(defaultField == null ? schema.getDefaultSearchFieldName() :
defaultField, schema.getQueryAnalyzer());
In other words, it turns around and calls the very method that was
deprecated to begin with. I don't quite understand why we would
deprecate something, add new functionality to supposedly replace it
and then have it use the functionality that we just deprecated?
This was changed on rev 510689. Mostly just wondering what the intent
is for the <defaultSearchField> tag. Are we planning on getting rid
of it?
Thanks,
Grant
- IndexSchema.getDefaultSearchFieldName Grant Ingersoll
-