You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2016/02/08 23:35:41 UTC

[06/50] [abbrv] lucene-solr git commit: LUCENE-6911: Add correct StandardQueryParser.getMultiFields() method, deprecate no-op StandardQueryParser.getMultiFields(CharSequence[]) method. (merge in revision 1717316 from branch_5x)

LUCENE-6911: Add correct StandardQueryParser.getMultiFields() method, deprecate no-op StandardQueryParser.getMultiFields(CharSequence[]) method. (merge in revision 1717316 from branch_5x)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_5_4@1717318 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/33c29258
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/33c29258
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/33c29258

Branch: refs/heads/branch_5_4
Commit: 33c292587bd7b283186005bbdd4fb74100cf1946
Parents: 4f24ad7
Author: Christine Poerschke <cp...@apache.org>
Authored: Mon Nov 30 20:29:55 2015 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Mon Nov 30 20:29:55 2015 +0000

----------------------------------------------------------------------
 lucene/CHANGES.txt                                      |  4 ++++
 .../flexible/standard/StandardQueryParser.java          | 12 ++++++++++++
 .../standard/config/StandardQueryConfigHandler.java     |  2 +-
 3 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33c29258/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 703a90e..e567316 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -81,6 +81,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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33c29258/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
index 358fd83..702f582 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.java
@@ -298,12 +298,24 @@ 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.
    * 
    * @param fuzzyPrefixLength

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33c29258/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
index 3b53b54..7570ecf 100644
--- a/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
+++ b/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/config/StandardQueryConfigHandler.java
@@ -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();