lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r882332 - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/highlighter/src/test/ src/java/org/apache/lucene/analysis/standard/ src/java/org/apache/lucene/search/ src/java/org/apache/lucene/util/ src/site/changes/ src/test/org/apache/...
Date Thu, 19 Nov 2009 22:19:21 GMT
Author: markrmiller
Date: Thu Nov 19 22:19:20 2009
New Revision: 882332

URL: http://svn.apache.org/viewvc?rev=882332&view=rev
Log:
LUCENE-1458: (flex branch) merge up to r881984

Added:
    lucene/java/branches/flex_1458/JRE_VERSION_MIGRATION.txt
      - copied unchanged from r882265, lucene/java/trunk/JRE_VERSION_MIGRATION.txt
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt
      - copied unchanged from r882265, lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/READ_BEFORE_REGENERATING.txt
Modified:
    lucene/java/branches/flex_1458/   (props changed)
    lucene/java/branches/flex_1458/CHANGES.txt
    lucene/java/branches/flex_1458/contrib/   (props changed)
    lucene/java/branches/flex_1458/contrib/CHANGES.txt   (contents, props changed)
    lucene/java/branches/flex_1458/contrib/highlighter/src/test/   (props changed)
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilteredTermsEnum.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/WildcardQuery.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Version.java
    lucene/java/branches/flex_1458/src/site/changes/ChangesFancyStyle.css
    lucene/java/branches/flex_1458/src/site/changes/ChangesFixedWidthStyle.css
    lucene/java/branches/flex_1458/src/site/changes/ChangesSimpleStyle.css
    lucene/java/branches/flex_1458/src/site/changes/changes2html.pl
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
  (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java
  (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java
  (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
  (props changed)
    lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTermRangeQuery.java

Propchange: lucene/java/branches/flex_1458/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9:817269-818600,829134,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests:818601-821336
 /lucene/java/branches/lucene_3_0:880793
-/lucene/java/trunk:824912-825292,827043-833960,880727-880846
+/lucene/java/trunk:824912-825292,827043-833960,880727-882265

Modified: lucene/java/branches/flex_1458/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/CHANGES.txt?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/CHANGES.txt Thu Nov 19 22:19:20 2009
@@ -76,7 +76,7 @@
   (Uwe Schindler, Robert Muir, Karl Wettin, Paul Elschot, Kay Kay, Shai Erera)
 
 * Generify Lucene API:
-  <code>
+
   - TokenStream/AttributeSource: Now addAttribute()/getAttribute() return an
     instance of the requested attribute interface and no cast needed anymore.
   - NumericRangeQuery, NumericRangeFilter, and FieldCacheRangeFilter
@@ -91,14 +91,13 @@
   - MapOfSets
   - o.a.l.util.cache package
   - lot's of internal APIs of IndexWriter
- </code>
  (Uwe Schindler, Michael Busch, Kay Kay, Robert Muir, Adriano Crestani)
   
 * LUCENE-1944, LUCENE-1856, LUCENE-1957, LUCENE-1960, LUCENE-1961,
   LUCENE-1968, LUCENE-1970, LUCENE-1946, LUCENE-1971, LUCENE-1975,
   LUCENE-1972, LUCENE-1978, LUCENE-944, LUCENE-1979, LUCENE-1973, LUCENE-2011:
   Remove deprecated methods/constructors/classes:
-  <code>
+
   - All String/File directory paths in IndexReader /
     IndexSearcher / IndexWriter.
   - Remove FSDirectory.getDirectory()
@@ -123,7 +122,6 @@
   - Remove BoostingTermQuery.
   - Remove MultiValueSource.
   - Remove Scorer.explain(int).
-  </code>
   ...and some other minor ones (Uwe Schindler, Michael Busch, Mark Miller)
   
 * LUCENE-1925: Make IndexSearcher's subReaders and docStarts members

Propchange: lucene/java/branches/flex_1458/contrib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9/contrib:817269-818600,825998,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib:818601-821336
 /lucene/java/branches/lucene_3_0/contrib:880793
-/lucene/java/trunk/contrib:824912-825292,827043-833960,880727-880846
+/lucene/java/trunk/contrib:824912-825292,827043-833960,880727-882265

Modified: lucene/java/branches/flex_1458/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/CHANGES.txt?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/CHANGES.txt (original)
+++ lucene/java/branches/flex_1458/contrib/CHANGES.txt Thu Nov 19 22:19:20 2009
@@ -1,8 +1,8 @@
 Lucene contrib change Log
 
-======================= Trunk (not yet released) =========================
+======================= Trunk (not yet released) =======================
 
-======================= Release 3.0.0 (2009-11-25) =======================
+======================= Release 3.0.0 2009-11-25 =======================
 
 Changes in backwards compatibility policy
 

Propchange: lucene/java/branches/flex_1458/contrib/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9/contrib/CHANGES.txt:817269-818600,825998,826775,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/CHANGES.txt:818601-821336
 /lucene/java/branches/lucene_3_0/contrib/CHANGES.txt:880793
-/lucene/java/trunk/contrib/CHANGES.txt:829439-833960,880727-880846
+/lucene/java/trunk/contrib/CHANGES.txt:829439-833960,880727-882265

Propchange: lucene/java/branches/flex_1458/contrib/highlighter/src/test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -2,4 +2,4 @@
 /lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036
 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter/src/test:818601-821336
 /lucene/java/branches/lucene_3_0/contrib/highlighter/src/test:880793
-/lucene/java/trunk/contrib/highlighter/src/test:829439-833960,880727-880846
+/lucene/java/trunk/contrib/highlighter/src/test:829439-833960,880727-882265

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java
Thu Nov 19 22:19:20 2009
@@ -21,11 +21,13 @@
 
 /*
 
-NOTE: if you change this file and need to regenerate the tokenizer,
-      remember to use JRE 1.4 when running jflex (before Lucene 3.0).
-      This grammar now uses constructs (eg :digit:) whose meaning can
-      vary according to the JRE used to run jflex.  See
-      https://issues.apache.org/jira/browse/LUCENE-1126 for details
+WARNING: if you change StandardTokenizerImpl.jflex and need to regenerate
+      the tokenizer, only use Java 1.4 !!!
+      This grammar currently uses constructs (eg :digit:, :letter:) whose 
+      meaning can vary according to the JRE used to run jflex.  See
+      https://issues.apache.org/jira/browse/LUCENE-1126 for details.
+      For current backwards compatibility it is needed to support
+      only Java 1.4 - this will change in Lucene 3.1.
 
 */
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizerImpl.jflex
Thu Nov 19 22:19:20 2009
@@ -19,12 +19,13 @@
 
 /*
 
-NOTE: if you change StandardTokenizerImpl.jflex and need to regenerate
-      the tokenizer, remember to use JRE 1.4 to run jflex (before
-      Lucene 3.0).  This grammar now uses constructs (eg :digit:,
-      :letter:) whose meaning can vary according to the JRE used to
-      run jflex.  See
+WARNING: if you change StandardTokenizerImpl.jflex and need to regenerate
+      the tokenizer, only use Java 1.4 !!!
+      This grammar currently uses constructs (eg :digit:, :letter:) whose 
+      meaning can vary according to the JRE used to run jflex.  See
       https://issues.apache.org/jira/browse/LUCENE-1126 for details.
+      For current backwards compatibility it is needed to support
+      only Java 1.4 - this will change in Lucene 3.1.
 
 */
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilteredTermsEnum.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilteredTermsEnum.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilteredTermsEnum.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/FilteredTermsEnum.java
Thu Nov 19 22:19:20 2009
@@ -83,7 +83,9 @@
 
   @Override
   public TermRef term() throws IOException {
-    assert actualEnum != null;
+    if(actualEnum == null) {
+      return null;
+    }
     return actualEnum.term();
   }
     

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/MultiTermQueryWrapperFilter.java
Thu Nov 19 22:19:20 2009
@@ -97,91 +97,47 @@
   public void clearTotalNumberOfTerms() {
     query.clearTotalNumberOfTerms();
   }
-
-  abstract class TermGenerator {
-    // @deprecated
-    public void generate(IndexReader reader, TermEnum enumerator) throws IOException {
-      final int[] docs = new int[32];
-      final int[] freqs = new int[32];
-      TermDocs termDocs = reader.termDocs();
-      try {
+  
+  /**
+   * Returns a DocIdSet with documents that should be permitted in search
+   * results.
+   */
+  @Override
+  public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
+    final FilteredTermsEnum termsEnum = query.getTermsEnum(reader);
+    if (termsEnum != null) {
+      if (!termsEnum.empty()) {
+        // fill into a OpenBitSet
+        final OpenBitSet bitSet = new OpenBitSet(reader.maxDoc());
+        final int[] docs = new int[32];
+        final int[] freqs = new int[32];
         int termCount = 0;
-        do {
-          Term term = enumerator.term();
-          if (term == null)
-            break;
+        final Bits delDocs = reader.getDeletedDocs();
+        while (true) {
           termCount++;
-          termDocs.seek(term);
+          // System.out.println("  iter termCount=" + termCount + " term=" +
+          // enumerator.term().toBytesString());
+          DocsEnum docsEnum = termsEnum.docs(delDocs);
           while (true) {
-            final int count = termDocs.read(docs, freqs);
+            final int count = docsEnum.read(docs, freqs);
             if (count != 0) {
-              for(int i=0;i<count;i++) {
-                handleDoc(docs[i]);
+              for (int i = 0; i < count; i++) {
+                bitSet.set(docs[i]);
               }
             } else {
               break;
             }
           }
-        } while (enumerator.next());
-
-        query.incTotalNumberOfTerms(termCount);
-
-      } finally {
-        termDocs.close();
-      }
-    }
-
-    public void generate(IndexReader reader, TermsEnum enumerator) throws IOException {
-      //System.out.println("mtq.filter generate");
-      final int[] docs = new int[32];
-      final int[] freqs = new int[32];
-      int termCount = 0;
-      final Bits delDocs = reader.getDeletedDocs();
-      while(true) {
-        termCount++;
-        //System.out.println("  iter termCount=" + termCount + " term=" + enumerator.term().toBytesString());
-        DocsEnum docsEnum = enumerator.docs(delDocs);
-        while (true) {
-          final int count = docsEnum.read(docs, freqs);
-          if (count != 0) {
-            for(int i=0;i<count;i++) {
-              handleDoc(docs[i]);
-            }
-          } else {
+          TermRef term = termsEnum.next();
+          if (term == null) {
             break;
           }
+          // System.out.println("  enum next term=" + term.toBytesString());
+          assert term.termEquals(termsEnum.term());
         }
-        TermRef term = enumerator.next();
-        if (term == null) {
-          break;
-        }
-        //System.out.println("  enum next term=" + term.toBytesString());
-        assert term.termEquals(enumerator.term());
-      }
-      //System.out.println("  done termCount=" + termCount);
+        // System.out.println("  done termCount=" + termCount);
 
-      query.incTotalNumberOfTerms(termCount);
-    }
-    abstract public void handleDoc(int doc);
-  }
-  
-  /**
-   * Returns a DocIdSet with documents that should be
-   * permitted in search results.
-   */
-  @Override
-  public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
-    final FilteredTermsEnum termsEnum = query.getTermsEnum(reader);
-    if (termsEnum != null) {
-      if (!termsEnum.empty()) {
-        // fill into a OpenBitSet
-        final OpenBitSet bitSet = new OpenBitSet(reader.maxDoc());
-        new TermGenerator() {
-          @Override
-          public void handleDoc(int doc) {
-            bitSet.set(doc);
-          }
-        }.generate(reader, termsEnum);
+        query.incTotalNumberOfTerms(termCount);
         return bitSet;
       } else {
         return DocIdSet.EMPTY_DOCIDSET;
@@ -194,12 +150,34 @@
           return DocIdSet.EMPTY_DOCIDSET;
         // else fill into a OpenBitSet
         final OpenBitSet bitSet = new OpenBitSet(reader.maxDoc());
-        new TermGenerator() {
-          @Override
-          public void handleDoc(int doc) {
-            bitSet.set(doc);
-          }
-        }.generate(reader, enumerator);
+        final int[] docs = new int[32];
+        final int[] freqs = new int[32];
+        TermDocs termDocs = reader.termDocs();
+        try {
+          int termCount = 0;
+          do {
+            Term term = enumerator.term();
+            if (term == null)
+              break;
+            termCount++;
+            termDocs.seek(term);
+            while (true) {
+              final int count = termDocs.read(docs, freqs);
+              if (count != 0) {
+                for (int i = 0; i < count; i++) {
+                  bitSet.set(docs[i]);
+                }
+              } else {
+                break;
+              }
+            }
+          } while (enumerator.next());
+
+          query.incTotalNumberOfTerms(termCount);
+
+        } finally {
+          termDocs.close();
+        }
         return bitSet;
       } finally {
         enumerator.close();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/WildcardQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/WildcardQuery.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/WildcardQuery.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/search/WildcardQuery.java Thu
Nov 19 22:19:20 2009
@@ -53,6 +53,7 @@
   // nocommit: needs singletermenum stuff
   @Override
   protected FilteredTermsEnum getTermsEnum(IndexReader reader) throws IOException {
+    //nocommit: handle singletermenum
     return new WildcardTermsEnum(reader, getTerm());
   }
   

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Version.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Version.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Version.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/util/Version.java Thu Nov 19
22:19:20 2009
@@ -21,6 +21,11 @@
 /**
  * Use by certain classes to match version compatibility
  * across releases of Lucene.
+ * 
+ * <p><b>WARNING</b>: When changing the version parameter
+ * that you supply to components in Lucene, do not simply
+ * change the version at search-time, but instead also adjust
+ * your indexing code to match, and re-index.
  */
 public enum Version {
 

Modified: lucene/java/branches/flex_1458/src/site/changes/ChangesFancyStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/site/changes/ChangesFancyStyle.css?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/site/changes/ChangesFancyStyle.css (original)
+++ lucene/java/branches/flex_1458/src/site/changes/ChangesFancyStyle.css Thu Nov 19 22:19:20
2009
@@ -24,6 +24,11 @@
   color: purple; 
 }
 
+li.bulleted-list {
+  margin-top: 0.25em;
+  margin-bottom: 0.25em;
+}
+
 li {
   margin-top: 1em;
   margin-bottom: 1em;

Modified: lucene/java/branches/flex_1458/src/site/changes/ChangesFixedWidthStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/site/changes/ChangesFixedWidthStyle.css?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/site/changes/ChangesFixedWidthStyle.css (original)
+++ lucene/java/branches/flex_1458/src/site/changes/ChangesFixedWidthStyle.css Thu Nov 19
22:19:20 2009
@@ -26,6 +26,11 @@
   color: purple; 
 }
 
+li.bulleted-list {
+  margin-top: 0.25em;
+  margin-bottom: 0.25em;
+}
+
 li {
   margin-top: 1em;
   margin-bottom: 1em;

Modified: lucene/java/branches/flex_1458/src/site/changes/ChangesSimpleStyle.css
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/site/changes/ChangesSimpleStyle.css?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/site/changes/ChangesSimpleStyle.css (original)
+++ lucene/java/branches/flex_1458/src/site/changes/ChangesSimpleStyle.css Thu Nov 19 22:19:20
2009
@@ -1,3 +1,8 @@
+li.bulleted-list {
+  margin-top: 0.25em;
+  margin-bottom: 0.25em;
+}
+
 li {
   margin-top: 1em;
   margin-bottom: 1em;

Modified: lucene/java/branches/flex_1458/src/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/site/changes/changes2html.pl?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/site/changes/changes2html.pl (original)
+++ lucene/java/branches/flex_1458/src/site/changes/changes2html.pl Thu Nov 19 22:19:20 2009
@@ -219,8 +219,12 @@
 
     function collapseAll() {
       var unorderedLists = document.getElementsByTagName("ul");
-      for (var i = 0; i < unorderedLists.length; i++)
-        unorderedLists[i].style.display = "none";
+      for (var i = 0; i < unorderedLists.length; i++) {
+        if (unorderedLists[i].className != 'bulleted-list')
+          unorderedLists[i].style.display = "none";
+        else
+          unorderedLists[i].style.display = "block";
+      }
       var orderedLists = document.getElementsByTagName("ol");
       for (var i = 0; i < orderedLists.length; i++)
         orderedLists[i].style.display = "none"; 
@@ -285,6 +289,7 @@
          */
         if (list.id != '$first_relid.list' 
             && list.id != '$second_relid.list'
+            && list.className != 'bulleted-list'
             && (currentAnchor == ''
                 || ! shouldExpand(currentList, currentAnchor, list.id))) {
           list.style.display = "none";
@@ -392,7 +397,7 @@
       # Put attributions on their own lines.
       # Check for trailing parenthesized attribution with no following period.
       # Exclude things like "(see #3 above)" and "(use the bug number instead of xxxx)" 
-      unless ($item =~ s:\s*(\((?!see #|use the bug number)[^)"]+?\))\s*$:<br /><span
class="attrib">$1</span>:) {
+      unless ($item =~ s:\s*(\((?!see #|use the bug number)[^)"]+?\))\s*$:\n<br /><span
class="attrib">$1</span>:) {
         # If attribution is not found, then look for attribution with a
         # trailing period, but try not to include trailing parenthesized things
         # that are not attributions.
@@ -412,12 +417,45 @@
                       my ($no_parens) = $parenthetical =~ /^\((.*)\)$/s;
                       my @words = grep {/\S/} split /\s+/, $no_parens;
                       if ($no_parens =~ /\b(?:via|updates\s+from)\b/i || scalar(@words) <=
3) {
-                        $subst = "<br /><span class=\"attrib\">$parenthetical</span>";
+                        $subst = "\n<br /><span class=\"attrib\">$parenthetical</span>";
                       }
                     }
                     $subst . $trailing_period_and_or_issue;
                   }ex;
       }
+
+      $item =~ s{(.*?)(<code><pre>.*?</pre></code>)|(.*)}
+                {
+                  my $uncode = undef;
+                  if (defined($2)) {
+                    $uncode = $1 || '';
+                    $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}
+                                {
+                                  my $bulleted_list = $1;
+                                  $bulleted_list 
+                                    =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^
-].*(?:\n|\z))*)}
+                                        {<li class="bulleted-list">\n$1</li>\n}g;
+                                  $bulleted_list
+                                    =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;
+                                  $bulleted_list;
+                                }ge;
+                    "$uncode$2";
+                  } else {
+                    $uncode = $3 || '';
+                    $uncode =~ s{((?<=\n)[ ]*-.*\n(?:.*\n)*)}
+                                {
+                                  my $bulleted_list = $1;
+                                  $bulleted_list 
+                                    =~ s{(?:(?<=\n)|\A)[ ]*-[ ]*(.*(?:\n|\z)(?:[ ]+[^
-].*(?:\n|\z))*)}
+                                        {<li class="bulleted-list">\n$1</li>\n}g;
+                                  $bulleted_list
+                                    =~ s!(<li.*</li>\n)!<ul class="bulleted-list">\n$1</ul>\n!s;
+                                  $bulleted_list;
+                                }ge;
+                    $uncode;
+                  }
+                }sge;
+
       $item =~ s:\n{2,}:\n<p/>\n:g;                   # Keep paragraph breaks
       # Link LUCENE-XXX, SOLR-XXX and INFRA-XXX to JIRA
       $item =~ s{(?:${jira_url_prefix})?((?:LUCENE|SOLR|INFRA)-\d+)}

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -1,4 +1,4 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:829134,829881,831036
 /lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:880793
-/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824912-825292,826213-833960,880727-880846
+/lucene/java/trunk/src/test/org/apache/lucene/analysis/TestISOLatin1AccentFilter.java:824912-825292,826213-833960,880727-882265

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestDateTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -1,4 +1,4 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestDateTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestDateTools.java:829134,829881,831036
 /lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestDateTools.java:880793
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:824912-825292,826213-833960,880727-880846
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestDateTools.java:824912-825292,826213-833960,880727-882265

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/document/TestNumberTools.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -1,4 +1,4 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/document/TestNumberTools.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/document/TestNumberTools.java:829134,829881,831036
 /lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/document/TestNumberTools.java:880793
-/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:824912-825292,826213-833960,880727-880846
+/lucene/java/trunk/src/test/org/apache/lucene/document/TestNumberTools.java:824912-825292,826213-833960,880727-882265

Propchange: lucene/java/branches/flex_1458/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 19 22:19:20 2009
@@ -1,4 +1,4 @@
 /lucene/java/branches/lucene_2_4/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:748824
 /lucene/java/branches/lucene_2_9/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:829134,829881,831036
 /lucene/java/branches/lucene_3_0/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:880793
-/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824912-825292,826213-833960,880727-880846
+/lucene/java/trunk/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java:824912-825292,826213-833960,880727-882265

Modified: lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTermRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTermRangeQuery.java?rev=882332&r1=882331&r2=882332&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTermRangeQuery.java
(original)
+++ lucene/java/branches/flex_1458/src/test/org/apache/lucene/search/TestTermRangeQuery.java
Thu Nov 19 22:19:20 2009
@@ -50,19 +50,11 @@
     Query query = new TermRangeQuery("content", "A", "C", false, false);
     initializeIndex(new String[] {"A", "B", "C", "D"});
     IndexSearcher searcher = new IndexSearcher(dir, true);
-    ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
-    assertEquals("A,B,C,D, only B in range", 1, hits.length);
-    searcher.close();
 
-    initializeIndex(new String[] {"A", "B", "D"});
-    searcher = new IndexSearcher(dir, true);
-    hits = searcher.search(query, null, 1000).scoreDocs;
-    assertEquals("A,B,D, only B in range", 1, hits.length);
-    searcher.close();
 
     addDoc("C");
     searcher = new IndexSearcher(dir, true);
-    hits = searcher.search(query, null, 1000).scoreDocs;
+    ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs;
     assertEquals("C added, still only B in range", 1, hits.length);
     searcher.close();
   }



Mime
View raw message