Return-Path: Delivered-To: apmail-lucene-java-commits-archive@www.apache.org Received: (qmail 49787 invoked from network); 27 Mar 2010 19:12:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Mar 2010 19:12:44 -0000 Received: (qmail 92399 invoked by uid 500); 27 Mar 2010 19:12:43 -0000 Delivered-To: apmail-lucene-java-commits-archive@lucene.apache.org Received: (qmail 92374 invoked by uid 500); 27 Mar 2010 19:12:43 -0000 Mailing-List: contact java-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-commits@lucene.apache.org Received: (qmail 92367 invoked by uid 99); 27 Mar 2010 19:12:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 19:12:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Mar 2010 19:12:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A592E2388980; Sat, 27 Mar 2010 19:12:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r928246 [2/6] - in /lucene/java/branches/flex_1458: ./ backwards/src/ backwards/src/java/org/apache/lucene/search/ backwards/src/test/org/apache/lucene/analysis/ backwards/src/test/org/apache/lucene/document/ backwards/src/test/org/apache/l... Date: Sat, 27 Mar 2010 19:12:13 -0000 To: java-commits@lucene.apache.org From: uschindler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100327191214.A592E2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java (original) +++ lucene/java/branches/flex_1458/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java Sat Mar 27 19:12:08 2010 @@ -22,20 +22,20 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.Reader; import java.util.ArrayList; -import java.util.List; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Properties; import java.util.StringTokenizer; /** * Perf run configuration properties. - *

- * Numeric property containing ":", e.g. "10:100:5" is interpreted - * as array of numeric values. It is extracted once, on first use, and + *

+ * Numeric property containing ":", e.g. "10:100:5" is interpreted + * as array of numeric values. It is extracted once, on first use, and * maintain a round number to return the appropriate value. - *

- * The config property "work.dir" tells where is the root of + *

+ * The config property "work.dir" tells where is the root of * docs data dirs and indexes dirs. It is set to either of:

    *
  • value supplied for it in the alg file;
  • *
  • otherwise, value of System property "benchmark.work.dir";
  • @@ -48,30 +48,31 @@ public class Config { private int roundNumber = 0; private Properties props; - private HashMap valByRound = new HashMap(); - private HashMap colForValByRound = new HashMap(); + private HashMap valByRound = new HashMap(); + private HashMap colForValByRound = new HashMap(); private String algorithmText; /** * Read both algorithm and config properties. + * * @param algReader from where to read algorithm and config properties. * @throws IOException */ - public Config (Reader algReader) throws IOException { + public Config(Reader algReader) throws IOException { // read alg file to array of lines ArrayList lines = new ArrayList(); BufferedReader r = new BufferedReader(algReader); - int lastConfigLine=0; - for (String line = r.readLine(); line!=null; line=r.readLine()) { + int lastConfigLine = 0; + for (String line = r.readLine(); line != null; line = r.readLine()) { lines.add(line); - if (line.indexOf('=')>0) { + if (line.indexOf('=') > 0) { lastConfigLine = lines.size(); } } r.close(); // copy props lines to string StringBuffer sb = new StringBuffer(); - for (int i=0; i Round ").append(roundNumber-1).append("-->").append(roundNumber); + + StringBuffer sb = new StringBuffer("--> Round ").append(roundNumber - 1).append("-->").append(roundNumber); // log changes in values - if (valByRound.size()>0) { + if (valByRound.size() > 0) { sb.append(": "); for (final String name : valByRound.keySet()) { Object a = valByRound.get(name); if (a instanceof int[]) { int ai[] = (int[]) a; - int n1 = (roundNumber-1)%ai.length; - int n2 = roundNumber%ai.length; + int n1 = (roundNumber - 1) % ai.length; + int n2 = roundNumber % ai.length; sb.append(" ").append(name).append(":").append(ai[n1]).append("-->").append(ai[n2]); - } else if (a instanceof double[]){ + } else if (a instanceof double[]) { double ad[] = (double[]) a; - int n1 = (roundNumber-1)%ad.length; - int n2 = roundNumber%ad.length; + int n1 = (roundNumber - 1) % ad.length; + int n2 = roundNumber % ad.length; sb.append(" ").append(name).append(":").append(ad[n1]).append("-->").append(ad[n2]); - } - else { + } else if (a instanceof String[]) { + String ad[] = (String[]) a; + int n1 = (roundNumber - 1) % ad.length; + int n2 = roundNumber % ad.length; + sb.append(" ").append(name).append(":").append(ad[n1]).append("-->").append(ad[n2]); + } else { boolean ab[] = (boolean[]) a; - int n1 = (roundNumber-1)%ab.length; - int n2 = roundNumber%ab.length; + int n1 = (roundNumber - 1) % ab.length; + int n2 = roundNumber % ab.length; sb.append(" ").append(name).append(":").append(ab[n1]).append("-->").append(ab[n2]); } } @@ -270,62 +300,76 @@ public class Config { System.out.println(); System.out.println(sb.toString()); System.out.println(); - + return roundNumber; } - + + private String[] propToStringArray(String s) { + if (s.indexOf(":") < 0) { + return new String[]{s}; + } + + ArrayList a = new ArrayList(); + StringTokenizer st = new StringTokenizer(s, ":"); + while (st.hasMoreTokens()) { + String t = st.nextToken(); + a.add(t); + } + return (String[]) a.toArray(new String[a.size()]); + } + // extract properties to array, e.g. for "10:100:5" return int[]{10,100,5}. - private int[] propToIntArray (String s) { - if (s.indexOf(":")<0) { - return new int [] { Integer.parseInt(s) }; + private int[] propToIntArray(String s) { + if (s.indexOf(":") < 0) { + return new int[]{Integer.parseInt(s)}; } - + ArrayList a = new ArrayList(); - StringTokenizer st = new StringTokenizer(s,":"); + StringTokenizer st = new StringTokenizer(s, ":"); while (st.hasMoreTokens()) { String t = st.nextToken(); a.add(Integer.valueOf(t)); } - int res[] = new int[a.size()]; - for (int i=0; i a = new ArrayList(); - StringTokenizer st = new StringTokenizer(s,":"); + StringTokenizer st = new StringTokenizer(s, ":"); while (st.hasMoreTokens()) { String t = st.nextToken(); a.add(Double.valueOf(t)); } - double res[] = new double[a.size()]; - for (int i=0; i a = new ArrayList(); - StringTokenizer st = new StringTokenizer(s,":"); + StringTokenizer st = new StringTokenizer(s, ":"); while (st.hasMoreTokens()) { String t = st.nextToken(); a.add(new Boolean(t)); } - boolean res[] = new boolean[a.size()]; - for (int i=0; i for topics/qrels files - src/test/org/apache/lucene/benchmark/quality - File srcTestDir = new File(new File(new File(new File(new File( - new File(new File(workDir.getAbsoluteFile().getParentFile(), - "src"),"test"),"org"),"apache"),"lucene"),"benchmark"),"quality"); - + // prepare topics - File topicsFile = new File(srcTestDir, "trecTopics.txt"); - assertTrue("Bad topicsFile: "+topicsFile, topicsFile.exists()&& topicsFile.isFile()); + InputStream topics = getClass().getResourceAsStream("trecTopics.txt"); TrecTopicsReader qReader = new TrecTopicsReader(); - QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new FileReader(topicsFile))); + QualityQuery qqs[] = qReader.readQueries(new BufferedReader(new InputStreamReader(topics, "UTF-8"))); // prepare judge - File qrelsFile = new File(srcTestDir, "trecQRels.txt"); - assertTrue("Bad qrelsFile: "+qrelsFile, qrelsFile.exists()&& qrelsFile.isFile()); - Judge judge = new TrecJudge(new BufferedReader(new FileReader(qrelsFile))); + InputStream qrels = getClass().getResourceAsStream("trecQRels.txt"); + Judge judge = new TrecJudge(new BufferedReader(new InputStreamReader(qrels, "UTF-8"))); // validate topics & judgments match each other judge.validateData(qqs, logger); - IndexSearcher searcher = new IndexSearcher(FSDirectory.open(new File(workDir,"index")), true); + IndexSearcher searcher = new IndexSearcher(FSDirectory.open(new File(getWorkDir(),"index")), true); QualityQueryParser qqParser = new SimpleQQParser("title","body"); QualityBenchmark qrun = new QualityBenchmark(qqs, qqParser, searcher, docNameField); Modified: lucene/java/branches/flex_1458/contrib/contrib-build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/contrib-build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/contrib-build.xml (original) +++ lucene/java/branches/flex_1458/contrib/contrib-build.xml Sat Mar 27 19:12:08 2010 @@ -27,20 +27,20 @@ - - - - - + + + - + + + + - + @@ -52,16 +52,13 @@ - - - - - + + + - - + @@ -111,4 +108,18 @@ ]]> + + + + + + + + + + + + + + Modified: lucene/java/branches/flex_1458/contrib/highlighter/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/highlighter/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/highlighter/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/highlighter/build.xml Sat Mar 27 19:12:08 2010 @@ -25,28 +25,24 @@ - - - - - + + - - - + + - + - - Highlighter building dependency ${memory.jar} + + Highlighter building dependency contrib/memory - - Highlighter building dependency ${regex.jar} - + + Highlighter building dependency contrib/queries + Propchange: lucene/java/branches/flex_1458/contrib/highlighter/src/test/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Mar 27 19:12:08 2010 @@ -1,4 +1,4 @@ -/lucene/dev/trunk/lucene/contrib/highlighter/src/test:926653 +/lucene/dev/trunk/lucene/contrib/highlighter/src/test:926653,926948-928243 /lucene/java/branches/lucene_2_4/contrib/highlighter/src/test:748824 /lucene/java/branches/lucene_2_9/contrib/highlighter/src/test:817269-818600,825998,826775,829134,829816,829881,831036,896850,909334 /lucene/java/branches/lucene_2_9_back_compat_tests/contrib/highlighter/src/test:818601-821336 Propchange: lucene/java/branches/flex_1458/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Mar 27 19:12:08 2010 @@ -1,4 +1,4 @@ -/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:926653 +/lucene/dev/trunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:926653,926948-928243 /lucene/java/branches/lucene_2_9/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:909334 /lucene/java/trunk/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:916596,916685,916755,916769,917019,917148,917154,917161,917203-917204,919060,919119,919718,919731,919869,920237-920499,922013,922277,922525,922528,922583,922593,922602,922624,922797,922799,922806,922886-922887,923112,923238,924151,924207,924286,924321-924731,924781,925176-925462 /lucene/solr/branches/newtrunk/lucene/contrib/instantiated/src/test/org/apache/lucene/store/instantiated/TestIndicesEquals.java:926020-926289 Modified: lucene/java/branches/flex_1458/contrib/misc/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/misc/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/misc/build.xml Sat Mar 27 19:12:08 2010 @@ -27,17 +27,4 @@ - - - - - - - - - - - Modified: lucene/java/branches/flex_1458/contrib/queries/README.txt URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/queries/README.txt?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/queries/README.txt (original) +++ lucene/java/branches/flex_1458/contrib/queries/README.txt Sat Mar 27 19:12:08 2010 @@ -17,6 +17,7 @@ but reduces the overall score of docs co a sequence. An example might be a collection of primary keys from a database query result or perhaps a choice of "category" labels picked by the end user. +==== RegexQuery - Implements the regular expression term search query. Mark Harwood 25/02/2006 Modified: lucene/java/branches/flex_1458/contrib/queries/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/queries/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/queries/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/queries/build.xml Sat Mar 27 19:12:08 2010 @@ -23,5 +23,14 @@ Queries - various query object exotica not in core + + + + + + Modified: lucene/java/branches/flex_1458/contrib/queries/pom.xml.template URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/queries/pom.xml.template?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/queries/pom.xml.template (original) +++ lucene/java/branches/flex_1458/contrib/queries/pom.xml.template Sat Mar 27 19:12:08 2010 @@ -35,4 +35,11 @@ Queries - various query object exotica not in core jar + + + jakarta-regexp + jakarta-regexp + ${jakarta-regexp-version} + + Modified: lucene/java/branches/flex_1458/contrib/queryparser/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/queryparser/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/queryparser/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/queryparser/build.xml Sat Mar 27 19:12:08 2010 @@ -28,7 +28,9 @@ - + + + @@ -86,5 +88,17 @@ flags="g" byline="false"/> + + + + + + + + + + Modified: lucene/java/branches/flex_1458/contrib/spatial/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spatial/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/spatial/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/spatial/build.xml Sat Mar 27 19:12:08 2010 @@ -25,18 +25,16 @@ - - + - - + - + Misc building dependency ${misc.jar} Modified: lucene/java/branches/flex_1458/contrib/spellchecker/build.xml URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/spellchecker/build.xml?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/spellchecker/build.xml (original) +++ lucene/java/branches/flex_1458/contrib/spellchecker/build.xml Sat Mar 27 19:12:08 2010 @@ -24,6 +24,4 @@ - Modified: lucene/java/branches/flex_1458/contrib/xml-query-parser/LuceneCoreQuery.dtd URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/xml-query-parser/LuceneCoreQuery.dtd?rev=928246&r1=928245&r2=928246&view=diff ============================================================================== --- lucene/java/branches/flex_1458/contrib/xml-query-parser/LuceneCoreQuery.dtd (original) +++ lucene/java/branches/flex_1458/contrib/xml-query-parser/LuceneCoreQuery.dtd Sat Mar 27 19:12:08 2010 @@ -54,8 +54,8 @@ - - + + @@ -283,7 +283,60 @@ Passes content directly through to the s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +