ozeigermann    2004/07/20 00:38:21

  Modified:    src/stores/org/apache/slide/index TextContentIndexer.java
  Log:
  Applied patch by Guido Casper <[EMAIL PROTECTED]> to fix issue in
  http://issues.apache.org/bugzilla/show_bug.cgi?id=30183:
  - dropIndex did not drop any URI from the index since URI_FIELD has been added
  as an unindexed field.
  - dropIndex gets called on a PROPPATCH request since VersioningHelper
  called "content.remove( sToken, rUri, NodeRevisionNumber.HIDDEN_0_0 )" and
  mistakenly dropped the URI from the index (after fixing the first problem)
  
  Revision  Changes    Path
  1.4       +7 -5      
jakarta-slide/src/stores/org/apache/slide/index/TextContentIndexer.java
  
  Index: TextContentIndexer.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/stores/org/apache/slide/index/TextContentIndexer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TextContentIndexer.java   11 Jul 2004 11:19:38 -0000      1.3
  +++ TextContentIndexer.java   20 Jul 2004 07:38:21 -0000      1.4
  @@ -125,7 +125,7 @@
            // Create document
            Document doc = new Document();
   
  -         doc.add(Field.UnIndexed(URI_FIELD, uri.toString()));
  +         doc.add(Field.Keyword(URI_FIELD, uri.toString()));
            doc.add(Field.Text(CONTENT_TEXT,
               new CharArrayReader (revisionContent.getContent())));
   
  @@ -200,7 +200,7 @@
               // Create document
               Document doc = new Document();
   
  -            doc.add(Field.UnIndexed(URI_FIELD, uri.toString()));
  +            doc.add(Field.Keyword(URI_FIELD, uri.toString()));
               doc.add(Field.Text(CONTENT_TEXT,
                    new CharArrayReader (revisionContent.getContent())));
   
  @@ -256,6 +256,8 @@
       synchronized public void dropIndex(Uri uri, NodeRevisionNumber number)
         throws IndexException
       {
  +        if (number == NodeRevisionNumber.HIDDEN_0_0) return;
  +
           IndexWriter indexWriter = null;
           try
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to