You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by kr...@apache.org on 2016/11/21 22:39:13 UTC
[1/8] lucene-solr:jira/solr-8593: SOLR-9782: for json.nl expand test
coverage and comments w.r.t. NamedList(null=null)
Repository: lucene-solr
Updated Branches:
refs/heads/jira/solr-8593 750cf6d7a -> de3ba418a
SOLR-9782: for json.nl expand test coverage and comments w.r.t. NamedList(null=null)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f42cc2a8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f42cc2a8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f42cc2a8
Branch: refs/heads/jira/solr-8593
Commit: f42cc2a8c38b8da7fc9a28a5de09b386973fc69f
Parents: 3c4315c
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Nov 18 15:57:35 2016 +0000
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Nov 18 15:57:35 2016 +0000
----------------------------------------------------------------------
.../org/apache/solr/response/JSONResponseWriter.java | 14 +++++++-------
.../test/org/apache/solr/response/JSONWriterTest.java | 11 ++++++-----
2 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f42cc2a8/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java b/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java
index 462c656..ae1ea47 100644
--- a/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java
+++ b/solr/core/src/java/org/apache/solr/response/JSONResponseWriter.java
@@ -188,10 +188,10 @@ class JSONWriter extends TextResponseWriter {
}
/** Represents a NamedList directly as a JSON Object (essentially a Map)
- * repeating any keys if they are repeated in the NamedList. null is mapped
- * to "".
+ * repeating any keys if they are repeated in the NamedList.
+ * null key is mapped to "".
*/
- // NamedList("a"=1,"bar"="foo",null=3) => {"a":1,"bar":"foo","":3}
+ // NamedList("a"=1,"bar"="foo",null=3,null=null) => {"a":1,"bar":"foo","":3,"":null}
protected void writeNamedListAsMapWithDups(String name, NamedList val) throws IOException {
int sz = val.size();
writeMapOpener(sz);
@@ -214,7 +214,7 @@ class JSONWriter extends TextResponseWriter {
}
// Represents a NamedList directly as an array of JSON objects...
- // NamedList("a"=1,"b"=2,null=3) => [{"a":1},{"b":2},3]
+ // NamedList("a"=1,"b"=2,null=3,null=null) => [{"a":1},{"b":2},3,null]
protected void writeNamedListAsArrMap(String name, NamedList val) throws IOException {
int sz = val.size();
indent();
@@ -249,7 +249,7 @@ class JSONWriter extends TextResponseWriter {
}
// Represents a NamedList directly as an array of JSON objects...
- // NamedList("a"=1,"b"=2,null=3) => [["a",1],["b",2],[null,3]]
+ // NamedList("a"=1,"b"=2,null=3,null=null) => [["a",1],["b",2],[null,3],[null,null]]
protected void writeNamedListAsArrArr(String name, NamedList val) throws IOException {
int sz = val.size();
indent();
@@ -293,7 +293,7 @@ class JSONWriter extends TextResponseWriter {
// Represents a NamedList directly as an array with keys/values
// interleaved.
- // NamedList("a"=1,"b"=2,null=3) => ["a",1,"b",2,null,3]
+ // NamedList("a"=1,"b"=2,null=3,null=null) => ["a",1,"b",2,null,3,null,null]
protected void writeNamedListAsFlat(String name, NamedList val) throws IOException {
int sz = val.size();
writeArrayOpener(sz*2);
@@ -676,7 +676,7 @@ class JSONWriter extends TextResponseWriter {
/**
* Writes NamedLists directly as an array of NamedValuePair JSON objects...
- * NamedList("a"=1,"b"=2,null=3) => [{"name":"a","int":1},{"name":"b","int":2},{"int":3}]
+ * NamedList("a"=1,"b"=2,null=3,null=null) => [{"name":"a","int":1},{"name":"b","int":2},{"int":3},{"null":null}]
* NamedList("a"=1,"bar"="foo",null=3.4f) => [{"name":"a","int":1},{"name":"bar","str":"foo"},{"float":3.4}]
*/
class ArrayOfNamedValuePairJSONWriter extends JSONWriter {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f42cc2a8/solr/core/src/test/org/apache/solr/response/JSONWriterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/response/JSONWriterTest.java b/solr/core/src/test/org/apache/solr/response/JSONWriterTest.java
index 076d322..a056016 100644
--- a/solr/core/src/test/org/apache/solr/response/JSONWriterTest.java
+++ b/solr/core/src/test/org/apache/solr/response/JSONWriterTest.java
@@ -98,6 +98,7 @@ public class JSONWriterTest extends SolrTestCaseJ4 {
NamedList nl = new NamedList();
nl.add("data1", "he\u2028llo\u2029!"); // make sure that 2028 and 2029 are both escaped (they are illegal in javascript)
nl.add(null, 42);
+ nl.add(null, null);
rsp.add("nl", nl);
rsp.add("byte", Byte.valueOf((byte)-3));
@@ -108,15 +109,15 @@ public class JSONWriterTest extends SolrTestCaseJ4 {
final String expectedNLjson;
if (namedListStyle == JSONWriter.JSON_NL_FLAT) {
- expectedNLjson = "\"nl\":[\"data1\",\"he\\u2028llo\\u2029!\",null,42]";
+ expectedNLjson = "\"nl\":[\"data1\",\"he\\u2028llo\\u2029!\",null,42,null,null]";
} else if (namedListStyle == JSONWriter.JSON_NL_MAP) {
- expectedNLjson = "\"nl\":{\"data1\":\"he\\u2028llo\\u2029!\",\"\":42}";
+ expectedNLjson = "\"nl\":{\"data1\":\"he\\u2028llo\\u2029!\",\"\":42,\"\":null}";
} else if (namedListStyle == JSONWriter.JSON_NL_ARROFARR) {
- expectedNLjson = "\"nl\":[[\"data1\",\"he\\u2028llo\\u2029!\"],[null,42]]";
+ expectedNLjson = "\"nl\":[[\"data1\",\"he\\u2028llo\\u2029!\"],[null,42],[null,null]]";
} else if (namedListStyle == JSONWriter.JSON_NL_ARROFMAP) {
- expectedNLjson = "\"nl\":[{\"data1\":\"he\\u2028llo\\u2029!\"},42]";
+ expectedNLjson = "\"nl\":[{\"data1\":\"he\\u2028llo\\u2029!\"},42,null]";
} else if (namedListStyle == JSONWriter.JSON_NL_ARROFNVP) {
- expectedNLjson = "\"nl\":[{\"name\":\"data1\",\"str\":\"he\\u2028llo\\u2029!\"},{\"int\":42}]";
+ expectedNLjson = "\"nl\":[{\"name\":\"data1\",\"str\":\"he\\u2028llo\\u2029!\"},{\"int\":42},{\"null\":null}]";
} else {
expectedNLjson = null;
fail("unexpected namedListStyle="+namedListStyle);
[7/8] lucene-solr:jira/solr-8593: LUCENE-7543: Make changes-to-html
target an offline operation,
by moving the Lucene and Solr DOAP RDF files into the Git source repository
under dev-tools/doap/ and then pulling release dates from those files,
rather tha
Posted by kr...@apache.org.
LUCENE-7543: Make changes-to-html target an offline operation, by moving the Lucene and Solr DOAP RDF files into the Git source repository under dev-tools/doap/ and then pulling release dates from those files, rather than from JIRA.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/33ff6cde
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/33ff6cde
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/33ff6cde
Branch: refs/heads/jira/solr-8593
Commit: 33ff6cde9be9b9ab9c2e4c8f9dc5221bc998b673
Parents: bb3278d
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Nov 21 16:47:40 2016 -0500
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Nov 21 16:47:54 2016 -0500
----------------------------------------------------------------------
dev-tools/doap/README.txt | 5 +
dev-tools/doap/lucene.rdf | 707 +++++++++++++++++++++++++++++++
dev-tools/doap/solr.rdf | 455 ++++++++++++++++++++
lucene/CHANGES.txt | 4 +
lucene/build.xml | 5 +-
lucene/common-build.xml | 5 +-
lucene/site/changes/changes2html.pl | 96 ++---
solr/build.xml | 4 +-
8 files changed, 1207 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/dev-tools/doap/README.txt
----------------------------------------------------------------------
diff --git a/dev-tools/doap/README.txt b/dev-tools/doap/README.txt
new file mode 100644
index 0000000..f2a9a9c
--- /dev/null
+++ b/dev-tools/doap/README.txt
@@ -0,0 +1,5 @@
+This folder contains the DOAP[1] files for each project.
+
+Upon release, these files should be updated to include new release details.
+
+[1] DOAP: https://github.com/edumbill/doap
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/dev-tools/doap/lucene.rdf
----------------------------------------------------------------------
diff --git a/dev-tools/doap/lucene.rdf b/dev-tools/doap/lucene.rdf
new file mode 100644
index 0000000..8f70467
--- /dev/null
+++ b/dev-tools/doap/lucene.rdf
@@ -0,0 +1,707 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+ xmlns="http://usefulinc.com/ns/doap#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:asfext="http://projects.apache.org/ns/asfext#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<!--
+ =======================================================================
+
+ Copyright (c) 2016 The Apache Software Foundation.
+ All rights reserved.
+
+ =======================================================================
+-->
+ <Project rdf:about="http://lucene.apache.org/core/">
+ <created>2001-09-01</created>
+ <license rdf:resource="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
+ <name>Apache Lucene Core</name>
+ <homepage rdf:resource="http://lucene.apache.org/core/" />
+ <asfext:pmc rdf:resource="http://lucene.apache.org" />
+
+ <shortdesc>Apache Lucene is a high-performance, full-featured text search engine library</shortdesc>
+ <description>Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.
+ </description>
+ <bug-database rdf:resource="http://issues.apache.org/jira/browse/LUCENE" />
+ <mailing-list rdf:resource="http://lucene.apache.org/core/discussion.html" />
+ <download-page rdf:resource="http://lucene.apache.org/core/downloads.html" />
+ <programming-language>Java</programming-language>
+
+ <!--
+ The ASF has a finite set of categories projects should use,
+ but the list does grow occasionally, and we should keep an eye
+ on it and adjust which ones we list as appropriate.
+ -->
+ <category rdf:resource="http://projects.apache.org/category/database" />
+ <category rdf:resource="http://projects.apache.org/category/library" />
+ <category rdf:resource="http://projects.apache.org/category/search" />
+
+ <wiki rdf:resource="http://wiki.apache.org/lucene-java/"/>
+
+ <repository>
+ <GitRepository>
+ <location rdf:resource="https://git-wip-us.apache.org/repos/asf/lucene-solr.git"/>
+ </GitRepository>
+ </repository>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Apache Lucene Team</foaf:name>
+ <foaf:mbox rdf:resource="mailto:dev@lucene.apache.org"/>
+ </foaf:Person>
+ </maintainer>
+
+ <release>
+ <Version>
+ <name>lucene-6.3.0</name>
+ <created>2016-11-08</created>
+ <revision>6.3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-6.2.1</name>
+ <created>2016-09-20</created>
+ <revision>6.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-6.2.0</name>
+ <created>2016-08-25</created>
+ <revision>6.2.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-6.1.0</name>
+ <created>2016-06-17</created>
+ <revision>6.1.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-6.0.1</name>
+ <created>2016-05-28</created>
+ <revision>6.0.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-6.0.0</name>
+ <created>2016-04-08</created>
+ <revision>6.0.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.5.3</name>
+ <created>2016-09-09</created>
+ <revision>5.5.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.5.2</name>
+ <created>2016-06-25</created>
+ <revision>5.5.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.5.1</name>
+ <created>2016-05-05</created>
+ <revision>5.5.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.5.0</name>
+ <created>2016-02-22</created>
+ <revision>5.5.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.4.1</name>
+ <created>2016-01-23</created>
+ <revision>5.4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.4.0</name>
+ <created>2015-12-14</created>
+ <revision>5.4.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.3.2</name>
+ <created>2016-01-23</created>
+ <revision>5.3.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.3.1</name>
+ <created>2015-09-24</created>
+ <revision>5.3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.3.0</name>
+ <created>2015-08-21</created>
+ <revision>5.3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.2.1</name>
+ <created>2015-06-15</created>
+ <revision>5.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.2.0</name>
+ <created>2015-06-07</created>
+ <revision>5.2.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.1.0</name>
+ <created>2015-04-14</created>
+ <revision>5.1.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-5.0.0</name>
+ <created>2015-02-20</created>
+ <revision>5.0.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.10.4</name>
+ <created>2015-03-03</created>
+ <revision>4.10.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.10.3</name>
+ <created>2014-12-29</created>
+ <revision>4.10.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.10.2</name>
+ <created>2014-10-31</created>
+ <revision>4.10.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.10.1</name>
+ <created>2014-09-29</created>
+ <revision>4.10.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.10.0</name>
+ <created>2014-09-03</created>
+ <revision>4.10.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.9.1</name>
+ <created>2014-09-22</created>
+ <revision>4.9.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.9.0</name>
+ <created>2014-06-25</created>
+ <revision>4.9.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.8.1</name>
+ <created>2014-05-20</created>
+ <revision>4.8.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.8.0</name>
+ <created>2014-04-28</created>
+ <revision>4.8.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.7.2</name>
+ <created>2014-04-15</created>
+ <revision>4.7.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.7.1</name>
+ <created>2014-04-02</created>
+ <revision>4.7.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.7.0</name>
+ <created>2014-02-26</created>
+ <revision>4.7.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.6.1</name>
+ <created>2014-01-28</created>
+ <revision>4.6.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.6.0</name>
+ <created>2013-11-22</created>
+ <revision>4.6.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.5.1</name>
+ <created>2013-10-24</created>
+ <revision>4.5.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.5</name>
+ <created>2013-10-05</created>
+ <revision>4.5</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.4</name>
+ <created>2013-07-23</created>
+ <revision>4.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.3.1</name>
+ <created>2013-06-18</created>
+ <revision>4.3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.3</name>
+ <created>2013-05-06</created>
+ <revision>4.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.2.1</name>
+ <created>2013-04-03</created>
+ <revision>4.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.2</name>
+ <created>2013-03-11</created>
+ <revision>4.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.1</name>
+ <created>2013-01-22</created>
+ <revision>4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.0</name>
+ <created>2012-10-12</created>
+ <revision>4.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.0-BETA</name>
+ <created>2012-08-13</created>
+ <revision>4.0-BETA</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.0-ALPHA</name>
+ <created>2012-07-03</created>
+ <revision>4.0-ALPHA</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.6.2</name>
+ <created>2012-12-25</created>
+ <revision>3.6.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.6.1</name>
+ <created>2012-07-22</created>
+ <revision>3.6.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.6</name>
+ <created>2012-04-12</created>
+ <revision>3.6</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.5</name>
+ <created>2011-11-11</created>
+ <revision>3.5</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.4</name>
+ <created>2011-09-15</created>
+ <revision>3.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.3</name>
+ <created>2011-07-10</created>
+ <revision>3.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.2</name>
+ <created>2011-06-03</created>
+ <revision>3.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.1</name>
+ <created>2011-03-31</created>
+ <revision>3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.0.3</name>
+ <created>2010-12-03</created>
+ <revision>3.0.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.0.2</name>
+ <created>2010-06-18</created>
+ <revision>3.0.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.0.1</name>
+ <created>2010-02-26</created>
+ <revision>3.0.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.0</name>
+ <created>2009-11-25</created>
+ <revision>3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.9.4</name>
+ <created>2010-12-03</created>
+ <revision>2.9.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.9.3</name>
+ <created>2010-06-18</created>
+ <revision>2.9.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.9.2</name>
+ <created>2010-02-26</created>
+ <revision>2.9.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.9.1</name>
+ <created>2009-11-06</created>
+ <revision>2.9.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.9</name>
+ <created>2009-09-25</created>
+ <revision>2.9</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.4.1</name>
+ <created>2009-03-09</created>
+ <revision>2.4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.4</name>
+ <created>2008-10-08</created>
+ <revision>2.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.3.2</name>
+ <created>2008-05-06</created>
+ <revision>2.3.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.3.1</name>
+ <created>2008-02-22</created>
+ <revision>2.3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.3</name>
+ <created>2008-01-23</created>
+ <revision>2.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.2</name>
+ <created>2007-06-19</created>
+ <revision>2.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.1</name>
+ <created>2007-02-17</created>
+ <revision>2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-2.0.0</name>
+ <created>2006-05-26</created>
+ <revision>2.0.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.9.1</name>
+ <created>2006-03-02</created>
+ <revision>1.9.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.9-final</name>
+ <created>2006-02-27</created>
+ <revision>1.9 final</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.9-rc1</name>
+ <created>2006-02-21</created>
+ <revision>1.9 RC1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4.3</name>
+ <created>2004-12-07</created>
+ <revision>1.4.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4.2</name>
+ <created>2004-10-01</created>
+ <revision>1.4.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4.1</name>
+ <created>2004-08-02</created>
+ <revision>1.4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4-final</name>
+ <created>2004-07-01</created>
+ <revision>1.4 final</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4-rc3</name>
+ <created>2004-05-11</created>
+ <revision>1.4 RC3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4-rc2</name>
+ <created>2004-03-30</created>
+ <revision>1.4 RC2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.4-rc1</name>
+ <created>2004-03-29</created>
+ <revision>1.4 RC1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.3-final</name>
+ <created>2003-12-26</created>
+ <revision>1.3 final</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.3-rc3</name>
+ <created>2003-11-25</created>
+ <revision>1.3 RC3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.3-rc2</name>
+ <created>2003-10-22</created>
+ <revision>1.3 RC2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.3-rc1</name>
+ <created>2003-03-24</created>
+ <revision>1.3 RC1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-final</name>
+ <created>2002-06-13</created>
+ <revision>1.2 final</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-rc5</name>
+ <created>2002-05-14</created>
+ <revision>1.2 RC5</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-rc4</name>
+ <created>2002-02-14</created>
+ <revision>1.2 RC4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-rc3</name>
+ <created>2002-01-27</created>
+ <revision>1.2 RC3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-rc2</name>
+ <created>2001-10-19</created>
+ <revision>1.2 RC2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.2-rc1</name>
+ <created>2001-10-02</created>
+ <revision>1.2 RC1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.01b</name>
+ <created>2001-06-02</created>
+ <revision>1.01b</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-1.0</name>
+ <created>2000-10-04</created>
+ <revision>1.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-0.04</name>
+ <created>2000-04-19</created>
+ <revision>0.04</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-0.01</name>
+ <created>2000-03-30</created>
+ <revision>0.01</revision>
+ </Version>
+ </release>
+ </Project>
+</rdf:RDF>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/dev-tools/doap/solr.rdf
----------------------------------------------------------------------
diff --git a/dev-tools/doap/solr.rdf b/dev-tools/doap/solr.rdf
new file mode 100644
index 0000000..1483c64
--- /dev/null
+++ b/dev-tools/doap/solr.rdf
@@ -0,0 +1,455 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl"?>
+<rdf:RDF xml:lang="en"
+ xmlns="http://usefulinc.com/ns/doap#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:asfext="http://projects.apache.org/ns/asfext#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/">
+<!--
+ =======================================================================
+
+ Copyright (c) 2007 The Apache Software Foundation.
+ All rights reserved.
+
+ =======================================================================
+-->
+ <Project rdf:about="http://lucene.apache.org/solr/">
+ <created>2006-01-17</created>
+ <license rdf:resource="http://www.apache.org/licenses/LICENSE-2.0.txt"/>
+ <name>Apache Solr</name>
+ <homepage rdf:resource="http://lucene.apache.org/solr/" />
+ <asfext:pmc rdf:resource="http://lucene.apache.org" />
+
+ <shortdesc>Solr is a full-text search server</shortdesc>
+ <description>Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON, Ruby, and Python APIs, hit highlighting, faceted search, caching, replication, and a web administration interface.
+ </description>
+ <bug-database rdf:resource="http://issues.apache.org/jira/browse/SOLR" />
+ <mailing-list rdf:resource="http://lucene.apache.org/solr/discussion.html" />
+ <download-page rdf:resource="http://lucene.apache.org/solr/downloads.html" />
+ <programming-language>Java</programming-language>
+
+ <!--
+ The ASF has a finite set of categories projects should use,
+ but the list does grow occasionally, and we should keep an eye
+ on it and adjust which ones we list as appropriate.
+ -->
+ <category rdf:resource="http://projects.apache.org/category/web-framework" />
+ <category rdf:resource="http://projects.apache.org/category/network-server" />
+ <category rdf:resource="http://projects.apache.org/category/search" />
+
+ <wiki rdf:resource="http://wiki.apache.org/solr/"/>
+
+ <repository>
+ <GitRepository>
+ <location rdf:resource="https://git-wip-us.apache.org/repos/asf/lucene-solr.git"/>
+ </GitRepository>
+ </repository>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Apache Solr Team</foaf:name>
+ <foaf:mbox rdf:resource="mailto:dev@lucene.apache.org"/>
+ </foaf:Person>
+ </maintainer>
+
+ <release>
+ <Version>
+ <name>solr-6.3.0</name>
+ <created>2016-11-08</created>
+ <revision>6.3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-6.2.1</name>
+ <created>2016-09-20</created>
+ <revision>6.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-6.2.0</name>
+ <created>2016-08-25</created>
+ <revision>6.2.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-6.1.0</name>
+ <created>2016-06-17</created>
+ <revision>6.1.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-6.0.1</name>
+ <created>2016-05-28</created>
+ <revision>6.0.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-6.0.0</name>
+ <created>2016-04-08</created>
+ <revision>6.0.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.5.3</name>
+ <created>2016-09-09</created>
+ <revision>5.5.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.5.2</name>
+ <created>2016-06-25</created>
+ <revision>5.5.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.5.1</name>
+ <created>2016-05-05</created>
+ <revision>5.5.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.5.0</name>
+ <created>2016-02-22</created>
+ <revision>5.5.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.4.1</name>
+ <created>2016-01-23</created>
+ <revision>5.4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.4.0</name>
+ <created>2015-12-14</created>
+ <revision>5.4.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.3.2</name>
+ <created>2016-01-23</created>
+ <revision>5.3.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.3.1</name>
+ <created>2015-09-24</created>
+ <revision>5.3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.3.0</name>
+ <created>2015-08-21</created>
+ <revision>5.3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.2.1</name>
+ <created>2015-06-15</created>
+ <revision>5.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.2.0</name>
+ <created>2015-06-07</created>
+ <revision>5.2.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.1.0</name>
+ <created>2015-04-14</created>
+ <revision>5.1.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-5.0.0</name>
+ <created>2015-02-20</created>
+ <revision>5.0.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.10.4</name>
+ <created>2015-03-03</created>
+ <revision>4.10.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.10.3</name>
+ <created>2014-12-29</created>
+ <revision>4.10.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.10.2</name>
+ <created>2014-10-31</created>
+ <revision>4.10.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.10.1</name>
+ <created>2014-09-29</created>
+ <revision>4.10.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.10.0</name>
+ <created>2014-09-03</created>
+ <revision>4.10.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.9.1</name>
+ <created>2014-09-22</created>
+ <revision>4.9.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.9.0</name>
+ <created>2014-06-25</created>
+ <revision>4.9.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.8.1</name>
+ <created>2014-05-20</created>
+ <revision>4.8.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.8.0</name>
+ <created>2014-04-28</created>
+ <revision>4.8.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.7.2</name>
+ <created>2014-04-15</created>
+ <revision>4.7.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.7.1</name>
+ <created>2014-02-26</created>
+ <revision>4.7.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.7.0</name>
+ <created>2014-02-26</created>
+ <revision>4.7.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.6.1</name>
+ <created>2014-01-28</created>
+ <revision>4.6.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.6.0</name>
+ <created>2013-11-22</created>
+ <revision>4.6.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.5.1</name>
+ <created>2013-10-24</created>
+ <revision>4.5.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.5</name>
+ <created>2013-10-05</created>
+ <revision>4.5</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.4</name>
+ <created>2013-07-23</created>
+ <revision>4.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.3.1</name>
+ <created>2013-06-18</created>
+ <revision>4.3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.3</name>
+ <created>2013-05-06</created>
+ <revision>4.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.2.1</name>
+ <created>2013-04-03</created>
+ <revision>4.2.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.2</name>
+ <created>2013-03-11</created>
+ <revision>4.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.1</name>
+ <created>2013-01-22</created>
+ <revision>4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-4.0</name>
+ <created>2012-10-12</created>
+ <revision>4.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.0-BETA</name>
+ <created>2012-08-13</created>
+ <revision>4.0-BETA</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-4.0-ALPHA</name>
+ <created>2012-07-03</created>
+ <revision>4.0-ALPHA</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.6.2</name>
+ <created>2012-12-25</created>
+ <revision>3.6.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>lucene-3.6.1</name>
+ <created>2012-07-22</created>
+ <revision>3.6.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.6</name>
+ <created>2012-04-12</created>
+ <revision>3.6</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.5</name>
+ <created>2011-11-11</created>
+ <revision>3.5</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.4</name>
+ <created>2011-09-15</created>
+ <revision>3.4</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.3</name>
+ <created>2011-07-10</created>
+ <revision>3.3</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.2</name>
+ <created>2011-06-03</created>
+ <revision>3.2</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-3.1</name>
+ <created>2011-03-31</created>
+ <revision>3.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-1.4.1</name>
+ <created>2010-6-25</created>
+ <revision>1.4.1</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-1.4.0</name>
+ <created>2009-11-10</created>
+ <revision>1.4.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-1.3.0</name>
+ <created>2008-09-16</created>
+ <revision>1.3.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-1.2.0</name>
+ <created>2007-06-06</created>
+ <revision>1.2.0</revision>
+ </Version>
+ </release>
+ <release>
+ <Version>
+ <name>solr-1.1.0</name>
+ <created>2006-12-22</created>
+ <revision>1.1.0</revision>
+ </Version>
+ </release>
+ </Project>
+</rdf:RDF>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 9e41067..ca39e65 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -131,6 +131,10 @@ Build
* LUCENE-7387: fix defaultCodec in build.xml to account for the line ending (hossman)
+* LUCENE-7543: Make changes-to-html target an offline operation, by moving the
+ Lucene and Solr DOAP RDF files into the Git source repository under
+ dev-tools/doap/ and then pulling release dates from those files, rather than
+ from JIRA. (Mano Kovacs, hossman, Steve Rowe)
======================= Lucene 6.3.0 =======================
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/lucene/build.xml
----------------------------------------------------------------------
diff --git a/lucene/build.xml b/lucene/build.xml
index 11f4644..8b73ca6 100644
--- a/lucene/build.xml
+++ b/lucene/build.xml
@@ -357,13 +357,14 @@
<build-changes changes.src.file="${local.src.export.dir}/CHANGES.txt"
changes.target.dir="${local.src.export.dir}/docs/changes"
- changes.product="LUCENE"/>
+ changes.product="lucene"/>
<tar tarfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset prefix="lucene-${version}" dir="${local.src.export.dir}"/>
</tar>
<make-checksums file="${source.package.file}"/>
</target>
+
<!-- ================================================================== -->
<!-- Packages the sources from local working copy with tar-gzip -->
<!-- ================================================================== -->
@@ -478,7 +479,7 @@
</target>
<target name="changes-to-html">
- <build-changes changes.product="LUCENE"/>
+ <build-changes changes.product="lucene"/>
</target>
<target name="pitest-modules" depends="compile-test">
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/lucene/common-build.xml
----------------------------------------------------------------------
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index d92c452..d2db40b 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -2504,18 +2504,17 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<macrodef name="build-changes">
<attribute name="changes.product"/>
<attribute name="changes.src.file" default="CHANGES.txt"/>
+ <attribute name="changes.src.doap" default="${dev-tools.dir}/doap/@{changes.product}.rdf"/>
<attribute name="changes.target.dir" default="${changes.target.dir}"/>
<attribute name="lucene.javadoc.url" default="${lucene.javadoc.url}"/>
<sequential>
<mkdir dir="@{changes.target.dir}"/>
- <get src="https://issues.apache.org/jira/rest/api/2/project/@{changes.product}"
- dest="@{changes.target.dir}/jiraVersionList.json" httpusecaches="false"/>
<exec executable="${perl.exe}" input="@{changes.src.file}" output="@{changes.target.dir}/Changes.html"
failonerror="true" logError="true">
<arg value="-CSD"/>
<arg value="${changes.src.dir}/changes2html.pl"/>
<arg value="@{changes.product}"/>
- <arg value="@{changes.target.dir}/jiraVersionList.json"/>
+ <arg value="@{changes.src.doap}"/>
<arg value="@{lucene.javadoc.url}"/>
</exec>
<delete file="@{changes.target.dir}/jiraVersionList.json"/>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/lucene/site/changes/changes2html.pl
----------------------------------------------------------------------
diff --git a/lucene/site/changes/changes2html.pl b/lucene/site/changes/changes2html.pl
index d71f296..b3f8fdb 100755
--- a/lucene/site/changes/changes2html.pl
+++ b/lucene/site/changes/changes2html.pl
@@ -23,9 +23,8 @@
use strict;
use warnings;
+use XML::Simple;
-# JIRA REST API documentation: <http://docs.atlassian.com/jira/REST/latest/>
-my $project_info_url = 'https://issues.apache.org/jira/rest/api/2/project';
my $jira_url_prefix = 'http://issues.apache.org/jira/browse/';
my $github_pull_request_prefix = 'https://github.com/apache/lucene-solr/pull/';
my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id=';
@@ -45,7 +44,7 @@ my @releases = ();
my @lines = <STDIN>; # Get all input at once
#
-# Cmdline args: <LUCENE|SOLR> <JIRA-release-dates-json> <lucene-javadoc-url>(only from Solr)
+# Cmdline args: <LUCENE|SOLR> <project-DOAP-rdf-file> <lucene-javadoc-url>(only from Solr)
#
my $product = $ARGV[0];
my %release_dates = &setup_release_dates($ARGV[1]);
@@ -804,10 +803,6 @@ sub get_release_date {
# Handle '1.2 RC6', which should be '1.2 final'
$release = '1.2 final' if ($release eq '1.2 RC6');
- if (not exists($release_dates{$release})) {
- $release =~ s/\.0\.0/\.0/;
- }
-
$reldate = ( exists($release_dates{$release})
? $release_dates{$release}
: 'unknown');
@@ -825,60 +820,46 @@ sub get_release_date {
# Returns a list of alternating release names and dates, for use in populating
# the %release_dates hash.
#
-# Pulls release dates via the JIRA REST API. JIRA does not list
-# X.Y RCZ releases independently from releases X.Y, so the RC dates
-# as well as those named "final" are included below.
+# Pulls release dates from the project DOAP file.
#
sub setup_release_dates {
my %release_dates;
my $file = shift;
- if (uc($product) eq 'LUCENE') {
- %release_dates
- = ( '0.01' => '2000-03-30', '0.04' => '2000-04-19',
- '1.0' => '2000-10-04', '1.01b' => '2001-06-02',
- '1.2 RC1' => '2001-10-02', '1.2 RC2' => '2001-10-19',
- '1.2 RC3' => '2002-01-27', '1.2 RC4' => '2002-02-14',
- '1.2 RC5' => '2002-05-14', '1.2 final' => '2002-06-13',
- '1.3 RC1' => '2003-03-24', '1.3 RC2' => '2003-10-22',
- '1.3 RC3' => '2003-11-25', '1.3 final' => '2003-12-26',
- '1.4 RC1' => '2004-03-29', '1.4 RC2' => '2004-03-30',
- '1.4 RC3' => '2004-05-11', '1.4 final' => '2004-07-01',
- '1.4.1' => '2004-08-02', '1.4.2' => '2004-10-01',
- '1.4.3' => '2004-12-07', '1.9 RC1' => '2006-02-21',
- '1.9 final' => '2006-02-27', '1.9.1' => '2006-03-02',
- '2.0.0' => '2006-05-26', '2.1.0' => '2007-02-14',
- '2.2.0' => '2007-06-19', '2.3.0' => '2008-01-21',
- '2.3.1' => '2008-02-22', '2.3.2' => '2008-05-05',
- '2.4.0' => '2008-10-06', '2.4.1' => '2009-03-09',
- '2.9.0' => '2009-09-23', '2.9.1' => '2009-11-06',
- '3.0.0' => '2009-11-25');
- }
- my $project_info_json = readFile($file);
- my $project_info = json2perl($project_info_json);
- for my $version (@{$project_info->{versions}}) {
- if ($version->{releaseDate}) {
- my $date = substr($version->{releaseDate}, 0, 10);
- my $version_name = $version->{name};
- $release_dates{$version->{name}} = $date;
- if ($version_name =~ /^\d+\.\d+$/) {
- my $full_version_name = "$version->{name}.0";
- $release_dates{$full_version_name} = $date;
+ my $project_info = XMLin($file)->{Project};
+ my $version;
+ my $date;
+ for my $release (@{$project_info->{release}}) {
+ $version = $release->{Version};
+ if ($version->{created}) {
+ $date = normalize_date($version->{created});
+ my $version_name = $version->{revision};
+ $release_dates{$version->{revision}} = $date;
+ if ($version_name =~ /^([1-9]\d*\.\d+)([^.0-9].*|$)/) {
+ my $padded_version_name = "$1.0$2"; # Alias w/trailing ".0"
+ $release_dates{$padded_version_name} = $date;
+ } elsif ($version_name =~ /\.0(?=[^.0-9]|$)/) {
+ my $trimmed_version_name = $version_name;
+ $trimmed_version_name =~ s/\.0(?=[^.0-9]|$)//; # Alias w/o trailing ".0"
+ $release_dates{$trimmed_version_name} = $date;
}
}
}
return %release_dates;
}
-sub readFile {
- my $file = shift;
- open(F, '<'.$file) || die "could not open $file: $!";
- local $/ = undef;
- my $project_info_json = <F>;
- close(F);
- return $project_info_json;
+#
+# normalize_date
+#
+# Left-zero-pads month and day-of-month to 2 digits in dates of format YYYY-(M)M-(D)D
+#
+sub normalize_date {
+ my $date = shift;
+ my ($year, $month, $dom) = $date =~ /^(2\d\d\d)-(\d+)-(\d+)$/;
+ return sprintf("%04d-%02d-%02d", $year, $month, $dom);
}
+
#
# setup_month_regex
#
@@ -1038,23 +1019,4 @@ sub setup_lucene_bugzilla_jira_map {
36628 => 432);
}
-#
-# json2perl
-#
-# Converts a JSON string to the equivalent Perl data structure
-#
-sub json2perl {
- my $json_string = shift;
- $json_string =~ s/(:\s*)(true|false)/$1"$2"/g;
- $json_string =~ s/":/",/g;
- $json_string =~ s/\'/\\'/g;
- $json_string =~ s/\"/\'/g;
- my $project_info = eval $json_string;
- die "ERROR eval'ing munged JSON string ||$json_string||: $@\n"
- if ($@);
- die "ERROR empty value after eval'ing JSON string ||$json_string||\n"
- unless $project_info;
- return $project_info;
-}
-
1;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/33ff6cde/solr/build.xml
----------------------------------------------------------------------
diff --git a/solr/build.xml b/solr/build.xml
index b426d79..4c52b03 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -483,7 +483,7 @@
<build-changes changes.src.file="${src.export.dir}/solr/CHANGES.txt"
changes.target.dir="${src.export.dir}/solr/docs/changes"
- changes.product="SOLR"/>
+ changes.product="solr"/>
<tar destfile="${source.package.file}" compression="gzip" longfile="gnu">
<tarfileset dir="${src.export.dir}/lucene"
@@ -623,7 +623,7 @@
</target>
<target name="changes-to-html" depends="define-lucene-javadoc-url">
- <build-changes changes.product="SOLR"/>
+ <build-changes changes.product="solr"/>
</target>
<target name="sign-artifacts">
[6/8] lucene-solr:jira/solr-8593: LUCENE-7560: make
QueryBuilder.analyzeXXX methods protected
Posted by kr...@apache.org.
LUCENE-7560: make QueryBuilder.analyzeXXX methods protected
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/bb3278dd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/bb3278dd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/bb3278dd
Branch: refs/heads/jira/solr-8593
Commit: bb3278dd1797a45e06e7c03445ead75bad09828b
Parents: b426838
Author: Mike McCandless <mi...@apache.org>
Authored: Mon Nov 21 06:29:05 2016 -0500
Committer: Mike McCandless <mi...@apache.org>
Committed: Mon Nov 21 06:29:33 2016 -0500
----------------------------------------------------------------------
.../org/apache/lucene/util/QueryBuilder.java | 23 +++++++++++---------
1 file changed, 13 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bb3278dd/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java b/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
index 977af53..6c5ea15 100644
--- a/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
+++ b/lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
@@ -51,8 +51,8 @@ import org.apache.lucene.search.TermQuery;
* are provided so that the generated queries can be customized.
*/
public class QueryBuilder {
- private Analyzer analyzer;
- private boolean enablePositionIncrements = true;
+ protected Analyzer analyzer;
+ protected boolean enablePositionIncrements = true;
/** Creates a new QueryBuilder using the given analyzer. */
public QueryBuilder(Analyzer analyzer) {
@@ -186,9 +186,12 @@ public class QueryBuilder {
/**
* Creates a query from the analysis chain.
* <p>
- * Expert: this is more useful for subclasses such as queryparsers.
+ * Expert: this is more useful for subclasses such as queryparsers.
* If using this class directly, just use {@link #createBooleanQuery(String, String)}
- * and {@link #createPhraseQuery(String, String)}
+ * and {@link #createPhraseQuery(String, String)}. This is a complex method and
+ * it is usually not necessary to override it in a subclass; instead, override
+ * methods like {@link #newBooleanQuery}, etc., if possible.
+ *
* @param analyzer analyzer used for this query
* @param operator default boolean operator used for this query
* @param field field to create queries against
@@ -265,7 +268,7 @@ public class QueryBuilder {
/**
* Creates simple term query from the cached tokenstream contents
*/
- private Query analyzeTerm(String field, TokenStream stream) throws IOException {
+ protected Query analyzeTerm(String field, TokenStream stream) throws IOException {
TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);
stream.reset();
@@ -279,7 +282,7 @@ public class QueryBuilder {
/**
* Creates simple boolean query from the cached tokenstream contents
*/
- private Query analyzeBoolean(String field, TokenStream stream) throws IOException {
+ protected Query analyzeBoolean(String field, TokenStream stream) throws IOException {
TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);
stream.reset();
@@ -291,7 +294,7 @@ public class QueryBuilder {
return newSynonymQuery(terms.toArray(new Term[terms.size()]));
}
- private void add(BooleanQuery.Builder q, List<Term> current, BooleanClause.Occur operator) {
+ protected void add(BooleanQuery.Builder q, List<Term> current, BooleanClause.Occur operator) {
if (current.isEmpty()) {
return;
}
@@ -305,7 +308,7 @@ public class QueryBuilder {
/**
* Creates complex boolean query from the cached tokenstream contents
*/
- private Query analyzeMultiBoolean(String field, TokenStream stream, BooleanClause.Occur operator) throws IOException {
+ protected Query analyzeMultiBoolean(String field, TokenStream stream, BooleanClause.Occur operator) throws IOException {
BooleanQuery.Builder q = newBooleanQuery();
List<Term> currentQuery = new ArrayList<>();
@@ -328,7 +331,7 @@ public class QueryBuilder {
/**
* Creates simple phrase query from the cached tokenstream contents
*/
- private Query analyzePhrase(String field, TokenStream stream, int slop) throws IOException {
+ protected Query analyzePhrase(String field, TokenStream stream, int slop) throws IOException {
PhraseQuery.Builder builder = new PhraseQuery.Builder();
builder.setSlop(slop);
@@ -352,7 +355,7 @@ public class QueryBuilder {
/**
* Creates complex phrase query from the cached tokenstream contents
*/
- private Query analyzeMultiPhrase(String field, TokenStream stream, int slop) throws IOException {
+ protected Query analyzeMultiPhrase(String field, TokenStream stream, int slop) throws IOException {
MultiPhraseQuery.Builder mpqb = newMultiPhraseQueryBuilder();
mpqb.setSlop(slop);
[2/8] lucene-solr:jira/solr-8593: LUCENE-7466 - added axiomatic
similarity, patch from Peilin Yang
Posted by kr...@apache.org.
LUCENE-7466 - added axiomatic similarity, patch from Peilin Yang
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4236da27
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4236da27
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4236da27
Branch: refs/heads/jira/solr-8593
Commit: 4236da27d1b1cbced6c3fed4b3d3094fe796fa7e
Parents: f42cc2a
Author: Tommaso Teofili <to...@apache.org>
Authored: Sat Nov 19 08:28:25 2016 +0100
Committer: Tommaso Teofili <to...@apache.org>
Committed: Sat Nov 19 08:28:25 2016 +0100
----------------------------------------------------------------------
.../lucene/search/similarities/Axiomatic.java | 159 +++++++++++++++++++
.../search/similarities/AxiomaticF1EXP.java | 95 +++++++++++
.../search/similarities/AxiomaticF1LOG.java | 88 ++++++++++
.../search/similarities/AxiomaticF2EXP.java | 94 +++++++++++
.../search/similarities/AxiomaticF2LOG.java | 86 ++++++++++
.../search/similarities/AxiomaticF3EXP.java | 94 +++++++++++
.../search/similarities/AxiomaticF3LOG.java | 83 ++++++++++
.../similarities/TestAxiomaticSimilarity.java | 86 ++++++++++
8 files changed, 785 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/Axiomatic.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/Axiomatic.java b/lucene/core/src/java/org/apache/lucene/search/similarities/Axiomatic.java
new file mode 100644
index 0000000..9c2854c
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/Axiomatic.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+
+import java.util.List;
+
+import org.apache.lucene.search.Explanation;
+
+/**
+ * Axiomatic approaches for IR. From Hui Fang and Chengxiang Zhai
+ * 2005. An Exploration of Axiomatic Approaches to Information Retrieval.
+ * In Proceedings of the 28th annual international ACM SIGIR
+ * conference on Research and development in information retrieval
+ * (SIGIR '05). ACM, New York, NY, USA, 480-487.
+ * <p>
+ * There are a family of models. All of them are based on BM25,
+ * Pivoted Document Length Normalization and Language model with
+ * Dirichlet prior. Some components (e.g. Term Frequency,
+ * Inverted Document Frequency) in the original models are modified
+ * so that they follow some axiomatic constraints.
+ * </p>
+ *
+ * @lucene.experimental
+ */
+public abstract class Axiomatic extends SimilarityBase {
+ /**
+ * hyperparam for the growth function
+ */
+ protected final float s;
+
+ /**
+ * hyperparam for the primitive weighthing function
+ */
+ protected final float k;
+
+ /**
+ * the query length
+ */
+ protected final int queryLen;
+
+ /**
+ * Constructor setting all Axiomatic hyperparameters
+ * @param s hyperparam for the growth function
+ * @param queryLen the query length
+ * @param k hyperparam for the primitive weighting function
+ */
+ public Axiomatic(float s, int queryLen, float k) {
+ if (Float.isFinite(s) == false || Float.isNaN(s) || s < 0 || s > 1) {
+ throw new IllegalArgumentException("illegal s value: " + s + ", must be between 0 and 1");
+ }
+ if (Float.isFinite(k) == false || Float.isNaN(k) || k < 0 || k > 1) {
+ throw new IllegalArgumentException("illegal k value: " + k + ", must be between 0 and 1");
+ }
+ if (queryLen < 0 || queryLen > Integer.MAX_VALUE) {
+ throw new IllegalArgumentException("illegal query length value: "
+ + queryLen + ", must be larger 0 and smaller than MAX_INT");
+ }
+ this.s = s;
+ this.queryLen = queryLen;
+ this.k = k;
+ }
+
+ /**
+ * Constructor setting only s, letting k and queryLen to default
+ * @param s hyperparam for the growth function
+ */
+ public Axiomatic(float s) {
+ this(s, 1, 0.35f);
+ }
+
+ /**
+ * Constructor setting s and queryLen, letting k to default
+ * @param s hyperparam for the growth function
+ * @param queryLen the query length
+ */
+ public Axiomatic(float s, int queryLen) {
+ this(s, queryLen, 0.35f);
+ }
+
+ /**
+ * Default constructor
+ */
+ public Axiomatic() {
+ this(0.25f, 1, 0.35f);
+ }
+
+ @Override
+ public float score(BasicStats stats, float freq, float docLen) {
+ return tf(stats, freq, docLen)
+ * ln(stats, freq, docLen)
+ * tfln(stats, freq, docLen)
+ * idf(stats, freq, docLen)
+ - gamma(stats, freq, docLen);
+ }
+
+ @Override
+ protected void explain(List<Explanation> subs, BasicStats stats, int doc,
+ float freq, float docLen) {
+ if (stats.getBoost() != 1.0f) {
+ subs.add(Explanation.match(stats.getBoost(), "boost"));
+ }
+
+ subs.add(Explanation.match(this.k, "k"));
+ subs.add(Explanation.match(this.s, "s"));
+ subs.add(Explanation.match(this.queryLen, "queryLen"));
+ subs.add(Explanation.match(tf(stats, freq, docLen), "tf"));
+ subs.add(Explanation.match(ln(stats, freq, docLen), "ln"));
+ subs.add(Explanation.match(tfln(stats, freq, docLen), "tfln"));
+ subs.add(Explanation.match(idf(stats, freq, docLen), "idf"));
+ subs.add(Explanation.match(gamma(stats, freq, docLen), "gamma"));
+ super.explain(subs, stats, doc, freq, docLen);
+ }
+
+ /**
+ * Name of the axiomatic method.
+ */
+ @Override
+ public abstract String toString();
+
+ /**
+ * compute the term frequency component
+ */
+ protected abstract float tf(BasicStats stats, float freq, float docLen);
+
+ /**
+ * compute the document length component
+ */
+ protected abstract float ln(BasicStats stats, float freq, float docLen);
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ protected abstract float tfln(BasicStats stats, float freq, float docLen);
+
+ /**
+ * compute the inverted document frequency component
+ */
+ protected abstract float idf(BasicStats stats, float freq, float docLen);
+
+ /**
+ * compute the gamma component (only for F3EXp and F3LOG)
+ */
+ protected abstract float gamma(BasicStats stats, float freq, float docLen);
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1EXP.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1EXP.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1EXP.java
new file mode 100644
index 0000000..62317fd
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1EXP.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F1EXP is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term))
+ * where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF1EXP extends Axiomatic {
+ /**
+ * Constructor setting s and k, letting queryLen to default
+ * @param s hyperparam for the growth function
+ * @param k hyperparam for the primitive weighting function
+ */
+ public AxiomaticF1EXP(float s, float k) {
+ super(s, 1, k);
+ }
+
+ /**
+ * Constructor setting s only, letting k and queryLen to default
+ * @param s hyperparam for the growth function
+ */
+ public AxiomaticF1EXP(float s) {
+ this(s, 0.35f);
+ }
+
+ /**
+ * Default constructor
+ */
+ public AxiomaticF1EXP() {
+ super();
+ }
+
+ @Override
+ public String toString() {
+ return "F1EXP";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ if (freq <= 0.0) return 0f;
+ return (float) (1 + Math.log(1 + Math.log(freq)));
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return (stats.getAvgFieldLength() + this.s) / (stats.getAvgFieldLength() + docLen * this.s);
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.pow((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq(), this.k);
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return 0f;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1LOG.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1LOG.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1LOG.java
new file mode 100644
index 0000000..7cce2be
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF1LOG.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F1LOG is defined as Sum(tf(term_doc_freq)*ln(docLen)*IDF(term))
+ * where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF1LOG extends Axiomatic {
+
+ /**
+ * Constructor setting s only, letting k and queryLen to default
+ *
+ * @param s hyperparam for the growth function
+ */
+ public AxiomaticF1LOG(float s) {
+ super(s);
+ }
+
+ /**
+ * Default constructor
+ */
+ public AxiomaticF1LOG() {
+ super();
+ }
+
+ @Override
+ public String toString() {
+ return "F1LOG";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ if (freq <= 0.0) return 0f;
+ return (float) (1 + Math.log(1 + Math.log(freq)));
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return (stats.getAvgFieldLength() + this.s) / (stats.getAvgFieldLength() + docLen * this.s);
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.log((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq());
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return 0f;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2EXP.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2EXP.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2EXP.java
new file mode 100644
index 0000000..f9bc98a
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2EXP.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F2EXP is defined as Sum(tfln(term_doc_freq, docLen)*IDF(term))
+ * where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF2EXP extends Axiomatic {
+ /**
+ * Constructor setting s and k, letting queryLen to default
+ * @param s hyperparam for the growth function
+ * @param k hyperparam for the primitive weighting function
+ */
+ public AxiomaticF2EXP(float s, float k) {
+ super(s, 1, k);
+ }
+
+ /**
+ * Constructor setting s only, letting k and queryLen to default
+ * @param s hyperparam for the growth function
+ */
+ public AxiomaticF2EXP(float s) {
+ this(s, 0.35f);
+ }
+
+ /**
+ * Default constructor
+ */
+ public AxiomaticF2EXP() {
+ super();
+ }
+
+ @Override
+ public String toString() {
+ return "F2EXP";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return freq / (freq + this.s + this.s * docLen / stats.getAvgFieldLength());
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.pow((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq(), this.k);
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return 0f;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2LOG.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2LOG.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2LOG.java
new file mode 100644
index 0000000..fee2000
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF2LOG.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F2EXP is defined as Sum(tfln(term_doc_freq, docLen)*IDF(term))
+ * where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF2LOG extends Axiomatic {
+ /**
+ * Constructor setting s only, letting k and queryLen to default
+ *
+ * @param s hyperparam for the growth function
+ */
+ public AxiomaticF2LOG(float s) {
+ super(s);
+ }
+
+ /**
+ * Default constructor
+ */
+ public AxiomaticF2LOG() {
+ super();
+ }
+
+ @Override
+ public String toString() {
+ return "F2LOG";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return freq / (freq + this.s + this.s * docLen / stats.getAvgFieldLength());
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.log((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq());
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return 0f;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3EXP.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3EXP.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3EXP.java
new file mode 100644
index 0000000..c20194a
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3EXP.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F2EXP is defined as Sum(tf(term_doc_freq)*IDF(term)-gamma(docLen, queryLen))
+ * where IDF(t) = pow((N+1)/df(t), k) N=total num of docs, df=doc freq
+ * gamma(docLen, queryLen) = (docLen-queryLen)*queryLen*s/avdl
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF3EXP extends Axiomatic {
+
+ /**
+ * Constructor setting all Axiomatic hyperparameters
+ *
+ * @param s hyperparam for the growth function
+ * @param queryLen the query length
+ * @param k hyperparam for the primitive weighting function
+ */
+ public AxiomaticF3EXP(float s, int queryLen, float k) {
+ super(s, queryLen, k);
+ }
+
+ /**
+ * Constructor setting s and queryLen, letting k to default
+ *
+ * @param s hyperparam for the growth function
+ * @param queryLen the query length
+ */
+ public AxiomaticF3EXP(float s, int queryLen) {
+ this(s, queryLen, 0.35f);
+ }
+
+ @Override
+ public String toString() {
+ return "F3EXP";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ if (freq <= 0.0) return 0f;
+ return (float) (1 + Math.log(1 + Math.log(freq)));
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.pow((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq(), this.k);
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return (docLen - this.queryLen) * this.s * this.queryLen / stats.getAvgFieldLength();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3LOG.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3LOG.java b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3LOG.java
new file mode 100644
index 0000000..a9d82ad
--- /dev/null
+++ b/lucene/core/src/java/org/apache/lucene/search/similarities/AxiomaticF3LOG.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+/**
+ * F2EXP is defined as Sum(tf(term_doc_freq)*IDF(term)-gamma(docLen, queryLen))
+ * where IDF(t) = ln((N+1)/df(t)) N=total num of docs, df=doc freq
+ * gamma(docLen, queryLen) = (docLen-queryLen)*queryLen*s/avdl
+ *
+ * @lucene.experimental
+ */
+public class AxiomaticF3LOG extends Axiomatic {
+
+ /**
+ * Constructor setting s and queryLen, letting k to default
+ *
+ * @param s hyperparam for the growth function
+ * @param queryLen the query length
+ */
+ public AxiomaticF3LOG(float s, int queryLen) {
+ super(s, queryLen);
+ }
+
+ @Override
+ public String toString() {
+ return "F3LOG";
+ }
+
+ /**
+ * compute the term frequency component
+ */
+ @Override
+ protected float tf(BasicStats stats, float freq, float docLen) {
+ if (freq <= 0.0) return 0f;
+ return (float) (1 + Math.log(1 + Math.log(freq)));
+ }
+
+ /**
+ * compute the document length component
+ */
+ @Override
+ protected float ln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the mixed term frequency and document length component
+ */
+ @Override
+ protected float tfln(BasicStats stats, float freq, float docLen) {
+ return 1f;
+ }
+
+ /**
+ * compute the inverted document frequency component
+ */
+ @Override
+ protected float idf(BasicStats stats, float freq, float docLen) {
+ return (float) Math.log((stats.getNumberOfDocuments() + 1.0) / stats.getDocFreq());
+ }
+
+ /**
+ * compute the gamma component
+ */
+ @Override
+ protected float gamma(BasicStats stats, float freq, float docLen) {
+ return (docLen - this.queryLen) * this.s * this.queryLen / stats.getAvgFieldLength();
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4236da27/lucene/core/src/test/org/apache/lucene/search/similarities/TestAxiomaticSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/similarities/TestAxiomaticSimilarity.java b/lucene/core/src/test/org/apache/lucene/search/similarities/TestAxiomaticSimilarity.java
new file mode 100644
index 0000000..44c7e1d
--- /dev/null
+++ b/lucene/core/src/test/org/apache/lucene/search/similarities/TestAxiomaticSimilarity.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.search.similarities;
+
+import org.apache.lucene.util.LuceneTestCase;
+
+public class TestAxiomaticSimilarity extends LuceneTestCase {
+
+ public void testSaneNormValues() {
+ Axiomatic sim = new AxiomaticF2EXP();
+ for (int i = 0; i < 256; i++) {
+ float len = sim.decodeNormValue((byte) i);
+ assertFalse("negative len: " + len + ", byte=" + i, len < 0.0f);
+ assertFalse("inf len: " + len + ", byte=" + i, Float.isInfinite(len));
+ assertFalse("nan len for byte=" + i, Float.isNaN(len));
+ if (i > 0) {
+ assertTrue("len is not decreasing: " + len + ",byte=" + i, len < sim.decodeNormValue((byte) (i - 1)));
+ }
+ }
+ }
+
+ public void testIllegalS() {
+ IllegalArgumentException expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(Float.POSITIVE_INFINITY, 0.1f);
+ });
+ assertTrue(expected.getMessage().contains("illegal s value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(-1, 0.1f);
+ });
+ assertTrue(expected.getMessage().contains("illegal s value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(Float.NaN, 0.1f);
+ });
+ assertTrue(expected.getMessage().contains("illegal s value"));
+ }
+
+ public void testIllegalK() {
+ IllegalArgumentException expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(0.35f, 2f);
+ });
+ assertTrue(expected.getMessage().contains("illegal k value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(0.35f, -1f);
+ });
+ assertTrue(expected.getMessage().contains("illegal k value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(0.35f, Float.POSITIVE_INFINITY);
+ });
+ assertTrue(expected.getMessage().contains("illegal k value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(0.35f, Float.NaN);
+ });
+ assertTrue(expected.getMessage().contains("illegal k value"));
+ }
+
+ public void testIllegalQL() {
+ IllegalArgumentException expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF3EXP(0.35f, -1);
+ });
+ assertTrue(expected.getMessage().contains("illegal query length value"));
+
+ expected = expectThrows(IllegalArgumentException.class, () -> {
+ new AxiomaticF2EXP(0.35f, Integer.MAX_VALUE + 1);
+ });
+ assertTrue(expected.getMessage().contains("illegal k value"));
+ }
+}
[3/8] lucene-solr:jira/solr-8593: SOLR-9626: Add css class,
when match key is found
Posted by kr...@apache.org.
SOLR-9626: Add css class, when match key is found
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/380b5ca6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/380b5ca6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/380b5ca6
Branch: refs/heads/jira/solr-8593
Commit: 380b5ca626b396f1231936ca5d581416866f11b1
Parents: 4236da2
Author: Alexandre Rafalovitch <ar...@apache.org>
Authored: Sun Nov 20 22:18:55 2016 +1100
Committer: Alexandre Rafalovitch <ar...@apache.org>
Committed: Sun Nov 20 22:18:55 2016 +1100
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
solr/webapp/web/js/angular/controllers/analysis.js | 12 ++++++++++--
solr/webapp/web/partials/analysis.html | 2 +-
3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/380b5ca6/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9ba9eb8..6c2b99c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -170,6 +170,8 @@ Bug Fixes
(Mark Miller, Michael Sun)
* SOLR-9729: JDBCStream improvements (Kevin Risden)
+
+* SOLR-9626: new Admin UI now also highlights matched terms in the Analysis screen. (Alexandre Rafalovitch)
Other Changes
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/380b5ca6/solr/webapp/web/js/angular/controllers/analysis.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/analysis.js b/solr/webapp/web/js/angular/controllers/analysis.js
index ccd556a..48ec369 100644
--- a/solr/webapp/web/js/angular/controllers/analysis.js
+++ b/solr/webapp/web/js/angular/controllers/analysis.js
@@ -76,9 +76,17 @@ solrAdminApp.controller('AnalysisController',
for (key in tokenhash) {
if (key == "match" || key=="positionHistory") {
- //@ todo do something
+ //skip, to not display these keys in the UI
} else {
- token.keys.push({name:key, value:tokenhash[key]});
+ var tokenInfo = new Object();
+ tokenInfo.name = key;
+ tokenInfo.value = tokenhash[key];
+ if ('text' === key || 'raw_bytes' === key ) {
+ if (tokenhash.match) {
+ tokenInfo.extraclass = 'match'; //to highlight matching text strings
+ }
+ }
+ token.keys.push(tokenInfo);
}
}
tokens.push(token);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/380b5ca6/solr/webapp/web/partials/analysis.html
----------------------------------------------------------------------
diff --git a/solr/webapp/web/partials/analysis.html b/solr/webapp/web/partials/analysis.html
index 3c1b456..23527f7 100644
--- a/solr/webapp/web/partials/analysis.html
+++ b/solr/webapp/web/partials/analysis.html
@@ -106,7 +106,7 @@ limitations under the License.
<td class="details">
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
- <tr class="{{value.name}}" ng-repeat="value in token.keys" ng-show="verbose || value.name=='text'">
+ <tr class="{{value.name}} {{value.extraclass}}" ng-repeat="value in token.keys" ng-show="verbose || value.name=='text'">
<td>{{value.value}}</td>
</tr>
</tbody>
[5/8] lucene-solr:jira/solr-8593: LUCENE-7567: don't clone
BooleanClause in builder
Posted by kr...@apache.org.
LUCENE-7567: don't clone BooleanClause in builder
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b426838e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b426838e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b426838e
Branch: refs/heads/jira/solr-8593
Commit: b426838e8f2427cec07133ebfb49b267b570fbc1
Parents: c3f172a
Author: yonik <yo...@apache.org>
Authored: Sun Nov 20 22:56:38 2016 -0500
Committer: yonik <yo...@apache.org>
Committed: Sun Nov 20 22:56:38 2016 -0500
----------------------------------------------------------------------
.../src/java/org/apache/lucene/search/BooleanQuery.java | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b426838e/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
index e67d7f4..2ea0d0e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/BooleanQuery.java
@@ -109,7 +109,10 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
* @throws TooManyClauses if the new number of clauses exceeds the maximum clause number
*/
public Builder add(BooleanClause clause) {
- add(clause.getQuery(), clause.getOccur());
+ if (clauses.size() >= maxClauseCount) {
+ throw new TooManyClauses();
+ }
+ clauses.add(clause);
return this;
}
@@ -120,11 +123,7 @@ public class BooleanQuery extends Query implements Iterable<BooleanClause> {
* @throws TooManyClauses if the new number of clauses exceeds the maximum clause number
*/
public Builder add(Query query, Occur occur) {
- if (clauses.size() >= maxClauseCount) {
- throw new TooManyClauses();
- }
- clauses.add(new BooleanClause(query, occur));
- return this;
+ return add(new BooleanClause(query, occur));
}
/** Create a new {@link BooleanQuery} based on the parameters that have
[8/8] lucene-solr:jira/solr-8593: Merge branch 'apache-https-master'
into jira/solr-8593
Posted by kr...@apache.org.
Merge branch 'apache-https-master' into jira/solr-8593
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/de3ba418
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/de3ba418
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/de3ba418
Branch: refs/heads/jira/solr-8593
Commit: de3ba418a5824015289bd1d98a9ecc13be93e1d1
Parents: 750cf6d 33ff6cd
Author: Kevin Risden <kr...@apache.org>
Authored: Mon Nov 21 16:39:06 2016 -0600
Committer: Kevin Risden <kr...@apache.org>
Committed: Mon Nov 21 16:39:06 2016 -0600
----------------------------------------------------------------------
dev-tools/doap/README.txt | 5 +
dev-tools/doap/lucene.rdf | 707 +++++++++++++++++++
dev-tools/doap/solr.rdf | 455 ++++++++++++
lucene/CHANGES.txt | 6 +
lucene/build.xml | 5 +-
lucene/common-build.xml | 5 +-
.../org/apache/lucene/search/BooleanQuery.java | 11 +-
.../lucene/search/similarities/Axiomatic.java | 159 +++++
.../search/similarities/AxiomaticF1EXP.java | 95 +++
.../search/similarities/AxiomaticF1LOG.java | 88 +++
.../search/similarities/AxiomaticF2EXP.java | 94 +++
.../search/similarities/AxiomaticF2LOG.java | 86 +++
.../search/similarities/AxiomaticF3EXP.java | 94 +++
.../search/similarities/AxiomaticF3LOG.java | 83 +++
.../org/apache/lucene/util/QueryBuilder.java | 23 +-
.../similarities/TestAxiomaticSimilarity.java | 86 +++
lucene/site/changes/changes2html.pl | 96 +--
solr/CHANGES.txt | 2 +
solr/build.xml | 4 +-
.../solr/response/JSONResponseWriter.java | 14 +-
.../apache/solr/response/JSONWriterTest.java | 11 +-
.../web/js/angular/controllers/analysis.js | 12 +-
solr/webapp/web/partials/analysis.html | 2 +-
23 files changed, 2038 insertions(+), 105 deletions(-)
----------------------------------------------------------------------
[4/8] lucene-solr:jira/solr-8593: LUCENE-7466 - adjusted changes.txt
to reflect added axiomatic sim
Posted by kr...@apache.org.
LUCENE-7466 - adjusted changes.txt to reflect added axiomatic sim
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c3f172a4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c3f172a4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c3f172a4
Branch: refs/heads/jira/solr-8593
Commit: c3f172a40830b31d005dbb7c6bd518ea236aa5fb
Parents: 380b5ca
Author: Tommaso Teofili <to...@apache.org>
Authored: Sun Nov 20 14:21:42 2016 +0100
Committer: Tommaso Teofili <to...@apache.org>
Committed: Sun Nov 20 14:21:42 2016 +0100
----------------------------------------------------------------------
lucene/CHANGES.txt | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c3f172a4/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index dfbf318..9e41067 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -65,6 +65,8 @@ New features
* LUCENE-5867: Added BooleanSimilarity. (Robert Muir, Adrien Grand)
+* LUCENE-7466: Added AxiomaticSimilarity. (Peilin Yang via Tommaso Teofili)
+
Bug Fixes
* LUCENE-7547: JapaneseTokenizerFactory was failing to close the