You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2013/10/31 12:07:17 UTC

[jira] [Closed] (PDFBOX-157) never add documents when we don't create index

     [ https://issues.apache.org/jira/browse/PDFBOX-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Lehmkühler closed PDFBOX-157.
-------------------------------------

    Resolution: Not A Problem
      Assignee: Andreas Lehmkühler

This isn't a problem anymore after solving PDFBOX-1356 at the latest.

Set to closed

> never add documents when we don't create index
> ----------------------------------------------
>
>                 Key: PDFBOX-157
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-157
>             Project: PDFBox
>          Issue Type: Bug
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1477554
> Originally submitted by fanch444 on 2006-04-27 03:14.
> If we want to reindex a Folder and we call the index
> method of IndexFiles with the parameter create to
> false, it doesn't add any documents. The problem is at
> line 166 in
> src.org.pdfbox.searchengine.lucene.IndexFiles (version
> 0.7.2)
> The index method calls two times the same method with
> same parameters: indexDocs(root, index, CREATE);
> I think it should change the line 166 in 
> indexDocs(root, index, TRUE);
>  public void index( File root, boolean create, String
> index )
>     {
>         try
>         {
>             Date start = new Date();
>             writer = new IndexWriter(index, new
> StandardAnalyzer(), create);
>             writer.maxFieldLength = 1000000;
>             if (!create)
>             {                 // delete stale docs
>                 deleting = true;
>                 indexDocs(root, index, create);
>             }
>             indexDocs(root, index, create);       //
> add new docs
>             System.out.println("Optimizing index...");
>             writer.optimize();
>             writer.close();
>             Date end = new Date();
>             System.out.print(end.getTime() -
> start.getTime());
>             System.out.println(" total milliseconds");
>         }
>         catch( Exception e )
>         {
>             e.printStackTrace();
>         }
>     }



--
This message was sent by Atlassian JIRA
(v6.1#6144)