mirror of https://github.com/apache/lucene.git
LUCENE-6911: Add correct StandardQueryParser.getMultiFields() method, deprecate no-op StandardQueryParser.getMultiFields(CharSequence[]) method.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1717303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a649775350
commit
89444f10eb
|
@ -184,6 +184,10 @@ API Changes
|
|||
in-memory segments to disk without opening a near-real-time reader
|
||||
nor calling fsync (Robert Muir, Simon Willnauer, Mike McCandless)
|
||||
|
||||
* LUCENE-6911: Add correct StandardQueryParser.getMultiFields() method,
|
||||
deprecate no-op StandardQueryParser.getMultiFields(CharSequence[]) method.
|
||||
(Christine Poerschke, Coverity Scan (via Rishabh Patel))
|
||||
|
||||
Optimizations
|
||||
|
||||
* LUCENE-6708: TopFieldCollector does not compute the score several times on the
|
||||
|
|
|
@ -298,11 +298,23 @@ public class StandardQueryParser extends QueryParserHelper implements CommonQuer
|
|||
* certain query is <code>null</code>
|
||||
*
|
||||
* @param fields the fields used to expand the query
|
||||
* @deprecated Use StandardQueryParser#getMultiFields() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void getMultiFields(CharSequence[] fields) {
|
||||
getQueryConfigHandler().get(ConfigurationKeys.MULTI_FIELDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fields used to expand the query when the field for a
|
||||
* certain query is <code>null</code>
|
||||
*
|
||||
* @return the fields used to expand the query
|
||||
*/
|
||||
public CharSequence[] getMultiFields() {
|
||||
return getQueryConfigHandler().get(ConfigurationKeys.MULTI_FIELDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the prefix length for fuzzy queries. Default is 0.
|
||||
*
|
||||
|
|
|
@ -120,7 +120,7 @@ public class StandardQueryConfigHandler extends QueryConfigHandler {
|
|||
* is <code>null</code>
|
||||
*
|
||||
* @see StandardQueryParser#setMultiFields(CharSequence[])
|
||||
* @see StandardQueryParser#getMultiFields(CharSequence[])
|
||||
* @see StandardQueryParser#getMultiFields()
|
||||
*/
|
||||
final public static ConfigurationKey<CharSequence[]> MULTI_FIELDS = ConfigurationKey.newInstance();
|
||||
|
||||
|
|
Loading…
Reference in New Issue