You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2015/11/30 19:59:22 UTC

svn commit: r1717303 - in /lucene/dev/trunk/lucene: ./ queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/ queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/

Author: cpoerschke
Date: Mon Nov 30 18:59:22 2015
New Revision: 1717303

URL: http://svn.apache.org/viewvc?rev=1717303&view=rev
Log:
LUCENE-6911: Add correct StandardQueryParser.getMultiFields() method, deprecate no-op StandardQueryParser.getMultiFields(CharSequence[]) method.

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
    lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1717303&r1=1717302&r2=1717303&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Mon Nov 30 18:59:22 2015
@@ -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

Modified: lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java?rev=1717303&r1=1717302&r2=1717303&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java (original)
+++ lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java Mon Nov 30 18:59:22 2015
@@ -298,12 +298,24 @@ public class StandardQueryParser extends
    * 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.
    * 
    * @param fuzzyPrefixLength

Modified: lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java?rev=1717303&r1=1717302&r2=1717303&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java (original)
+++ lucene/dev/trunk/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java Mon Nov 30 18:59:22 2015
@@ -120,7 +120,7 @@ public class StandardQueryConfigHandler
      * is <code>null</code>
      * 
      * @see StandardQueryParser#setMultiFields(CharSequence[])
-     * @see StandardQueryParser#getMultiFields(CharSequence[])
+     * @see StandardQueryParser#getMultiFields()
      */
     final public static ConfigurationKey<CharSequence[]> MULTI_FIELDS = ConfigurationKey.newInstance();