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 2017/03/03 13:17:50 UTC

[1/2] lucene-solr:master: SOLR-10155: For numeric types facet.contains= and facet.prefix= are now rejected. (Gus Heck, Christine Poerschke)

Repository: lucene-solr
Updated Branches:
  refs/heads/master da113fde7 -> d947f53ef


SOLR-10155: For numeric types facet.contains= and facet.prefix= are now rejected.
(Gus Heck, Christine Poerschke)


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

Branch: refs/heads/master
Commit: 43474312eb2b66df4102bd653b9546e7eff47363
Parents: da113fd
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Mar 3 12:03:41 2017 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Mar 3 12:03:41 2017 +0000

----------------------------------------------------------------------
 solr/CHANGES.txt                                          |  2 ++
 .../src/java/org/apache/solr/request/SimpleFacets.java    | 10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/43474312/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 09912ee..fa4d33b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -271,6 +271,8 @@ Other Changes
 
 * SOLR-10219: re-enable HDFS tests under JDK9 (hossman, Uwe Schindler)
 
+* SOLR-10155: For numeric types facet.contains= and facet.prefix= are now rejected.
+  (Gus Heck, Christine Poerschke)
 
 ==================  6.4.2 ==================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/43474312/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
index 4190958..5370dd9 100644
--- a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
@@ -484,15 +484,13 @@ public class SimpleFacets {
         case FCS:
           assert ft.isPointField() || !multiToken;
           if (ft.isPointField() || (ft.getNumberType() != null && !sf.multiValued())) {
-            // force numeric faceting
-            if (prefix != null && !prefix.isEmpty()) {
+            if (prefix != null) {
               throw new SolrException(ErrorCode.BAD_REQUEST, FacetParams.FACET_PREFIX + " is not supported on numeric types");
             }
             if (termFilter != null) {
-              final boolean supportedOperation = (termFilter instanceof SubstringBytesRefFilter) && ((SubstringBytesRefFilter) termFilter).substring().isEmpty();
-              if (!supportedOperation) {
-                throw new SolrException(ErrorCode.BAD_REQUEST, FacetParams.FACET_CONTAINS + " is not supported on numeric types");
-              }
+              throw new SolrException(ErrorCode.BAD_REQUEST, "BytesRef term filters ("
+                      + FacetParams.FACET_CONTAINS + ", "
+                      + FacetParams.FACET_EXCLUDETERMS + ") are not supported on numeric types");
             }
 //            We should do this, but mincount=0 is currently the default
 //            if (ft.isPointField() && mincount <= 0) {


[2/2] lucene-solr:master: LUCENE-7731: fix typo in search/package-summary.html#scoring javadocs. (chillon.m via Christine Poerschke)

Posted by cp...@apache.org.
LUCENE-7731: fix typo in search/package-summary.html#scoring javadocs. (chillon.m via Christine Poerschke)


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

Branch: refs/heads/master
Commit: d947f53ef0de8c0b5fef2757f1f6c8d0874df8a4
Parents: 4347431
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Mar 3 13:13:26 2017 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Mar 3 13:13:26 2017 +0000

----------------------------------------------------------------------
 lucene/core/src/java/org/apache/lucene/search/package-info.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d947f53e/lucene/core/src/java/org/apache/lucene/search/package-info.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/package-info.java b/lucene/core/src/java/org/apache/lucene/search/package-info.java
index c9d8e26..2201be0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/package-info.java
+++ b/lucene/core/src/java/org/apache/lucene/search/package-info.java
@@ -226,7 +226,7 @@
  *    <a href="http://en.wikipedia.org/wiki/Information_retrieval#Model_types">models</a>, including:
  *    <ul>
  *      <li><a href="http://en.wikipedia.org/wiki/Vector_Space_Model">Vector Space Model (VSM)</a></li>
- *      <li><a href="http://en.wikipedia.org/wiki/Probabilistic_relevance_model">Probablistic Models</a> such as 
+ *      <li><a href="http://en.wikipedia.org/wiki/Probabilistic_relevance_model">Probabilistic Models</a> such as 
  *          <a href="http://en.wikipedia.org/wiki/Probabilistic_relevance_model_(BM25)">Okapi BM25</a> and
  *          <a href="http://en.wikipedia.org/wiki/Divergence-from-randomness_model">DFR</a></li>
  *      <li><a href="http://en.wikipedia.org/wiki/Language_model">Language models</a></li>