cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/transformation LuceneIndexTransformer.java
Date Mon, 04 Aug 2003 03:12:16 GMT
joerg       2003/08/03 20:12:16

  Modified:    src/blocks/lucene/java/org/apache/cocoon/transformation
                        LuceneIndexTransformer.java
  Log:
  removed useless assignments
  
  Revision  Changes    Path
  1.6       +7 -12     cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/transformation/LuceneIndexTransformer.java
  
  Index: LuceneIndexTransformer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/lucene/java/org/apache/cocoon/transformation/LuceneIndexTransformer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LuceneIndexTransformer.java	20 Jul 2003 03:33:42 -0000	1.5
  +++ LuceneIndexTransformer.java	4 Aug 2003 03:12:16 -0000	1.6
  @@ -277,12 +277,9 @@
   
                   analyzerClassname =
                       atts.getValue(LUCENE_QUERY_ANALYZER_ATTRIBUTE);
  -                if (analyzerClassname == null)
  -                    analyzerClassname = this.analyzerClassname;
   
                   String sMergeFactor =
                       atts.getValue(LUCENE_QUERY_MERGE_FACTOR_ATTRIBUTE);
  -                mergeFactor = this.mergeFactor;
                   if (sMergeFactor != null)
                       mergeFactor = Integer.parseInt(sMergeFactor);
   
  @@ -447,14 +444,13 @@
           File indexDirectory = new File(workDir, directoryName);
           // If the index directory doesn't exist, then always create it.
           boolean indexExists = IndexReader.indexExists(indexDirectory);
  -        if (! IndexReader.indexExists(indexDirectory)) 
  +        if (!indexExists) {
               createIndex = true;
  +        }
           
           // Get the index directory, creating it if necessary
  -        Directory directory = LuceneCocoonHelper.getDirectory(
  -            indexDirectory, 
  -            createIndex
  -        );
  +        Directory directory = LuceneCocoonHelper.getDirectory(indexDirectory,
  +                                                              createIndex);
           Analyzer analyzer = LuceneCocoonHelper.getAnalyzer(analyzerClassname);
           this.writer = new IndexWriter(directory, analyzer, createIndex);
           this.writer.mergeFactor = mergeFactor; 
  @@ -462,9 +458,8 @@
       
       private IndexReader openReader() throws IOException {
           Directory directory = LuceneCocoonHelper.getDirectory(
  -            new File(workDir, directoryName), 
  -            createIndex
  -        );
  +                                            new File(workDir, directoryName),
  +                                            createIndex);
           IndexReader reader = IndexReader.open(directory);
           return reader;
       }    
  
  
  

Mime
View raw message