[jira] Updated: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter

2009-06-29 Thread Tim Smith (JIRA)

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

Tim Smith updated LUCENE-1705:
--

Attachment: TestIndexWriterDelete.patch

Here's a patch to TestIndexWriterDelete that shows the problem

after the deleteAll(), a document is added and a document is updated
the added document gets indexed, the updated document does not

 Add deleteAllDocuments() method to IndexWriter
 --

 Key: LUCENE-1705
 URL: https://issues.apache.org/jira/browse/LUCENE-1705
 Project: Lucene - Java
  Issue Type: Wish
  Components: Index
Affects Versions: 2.4
Reporter: Tim Smith
Assignee: Michael McCandless
 Fix For: 2.9

 Attachments: IndexWriterDeleteAll.patch, LUCENE-1705.patch, 
 TestIndexWriterDelete.patch


 Ideally, there would be a deleteAllDocuments() or clear() method on the 
 IndexWriter
 This method should have the same performance and characteristics as:
 * currentWriter.close()
 * currentWriter = new IndexWriter(..., create=true,...)
 This would greatly optimize a delete all documents case. Using 
 deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large 
 existing index.
 IndexWriter.deleteAllDocuments() should have the same semantics as a 
 commit(), as far as index visibility goes (new IndexReader opening would get 
 the empty index)
 I see this was previously asked for in LUCENE-932, however it would be nice 
 to finally see this added such that the IndexWriter would not need to be 
 closed to perform the clear as this seems to be the general recommendation 
 for working with an IndexWriter now
 deleteAllDocuments() method should:
 * abort any background merges (they are pointless once a deleteAll has been 
 received)
 * write new segments file referencing no segments
 This method would remove one of the final reasons i would ever need to close 
 an IndexWriter and reopen a new one 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter

2009-06-29 Thread Tim Smith (JIRA)

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

Tim Smith updated LUCENE-1705:
--

Attachment: DeleteAllFlushDocCountFix.patch

Here's a patch that fixes the deleteAll() + updateDocument() issue

just needed to set the FlushDocCount to 0 after aborting the outstanding 
documents

 Add deleteAllDocuments() method to IndexWriter
 --

 Key: LUCENE-1705
 URL: https://issues.apache.org/jira/browse/LUCENE-1705
 Project: Lucene - Java
  Issue Type: Wish
  Components: Index
Affects Versions: 2.4
Reporter: Tim Smith
Assignee: Michael McCandless
 Fix For: 2.9

 Attachments: DeleteAllFlushDocCountFix.patch, 
 IndexWriterDeleteAll.patch, LUCENE-1705.patch


 Ideally, there would be a deleteAllDocuments() or clear() method on the 
 IndexWriter
 This method should have the same performance and characteristics as:
 * currentWriter.close()
 * currentWriter = new IndexWriter(..., create=true,...)
 This would greatly optimize a delete all documents case. Using 
 deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large 
 existing index.
 IndexWriter.deleteAllDocuments() should have the same semantics as a 
 commit(), as far as index visibility goes (new IndexReader opening would get 
 the empty index)
 I see this was previously asked for in LUCENE-932, however it would be nice 
 to finally see this added such that the IndexWriter would not need to be 
 closed to perform the clear as this seems to be the general recommendation 
 for working with an IndexWriter now
 deleteAllDocuments() method should:
 * abort any background merges (they are pointless once a deleteAll has been 
 received)
 * write new segments file referencing no segments
 This method would remove one of the final reasons i would ever need to close 
 an IndexWriter and reopen a new one 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter

2009-06-29 Thread Tim Smith (JIRA)

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

Tim Smith updated LUCENE-1705:
--

Attachment: (was: TestIndexWriterDelete.patch)

 Add deleteAllDocuments() method to IndexWriter
 --

 Key: LUCENE-1705
 URL: https://issues.apache.org/jira/browse/LUCENE-1705
 Project: Lucene - Java
  Issue Type: Wish
  Components: Index
Affects Versions: 2.4
Reporter: Tim Smith
Assignee: Michael McCandless
 Fix For: 2.9

 Attachments: DeleteAllFlushDocCountFix.patch, 
 IndexWriterDeleteAll.patch, LUCENE-1705.patch


 Ideally, there would be a deleteAllDocuments() or clear() method on the 
 IndexWriter
 This method should have the same performance and characteristics as:
 * currentWriter.close()
 * currentWriter = new IndexWriter(..., create=true,...)
 This would greatly optimize a delete all documents case. Using 
 deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large 
 existing index.
 IndexWriter.deleteAllDocuments() should have the same semantics as a 
 commit(), as far as index visibility goes (new IndexReader opening would get 
 the empty index)
 I see this was previously asked for in LUCENE-932, however it would be nice 
 to finally see this added such that the IndexWriter would not need to be 
 closed to perform the clear as this seems to be the general recommendation 
 for working with an IndexWriter now
 deleteAllDocuments() method should:
 * abort any background merges (they are pointless once a deleteAll has been 
 received)
 * write new segments file referencing no segments
 This method would remove one of the final reasons i would ever need to close 
 an IndexWriter and reopen a new one 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter

2009-06-25 Thread Michael McCandless (JIRA)

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

Michael McCandless updated LUCENE-1705:
---

Attachment: LUCENE-1705.patch

Patch looks good Tim!

I added another test case (for NRT reader), removed the un-needed notifyAll  
assert, and tweaked javadocs.  I think it's ready to go in... I'll wait a day 
or two.

 Add deleteAllDocuments() method to IndexWriter
 --

 Key: LUCENE-1705
 URL: https://issues.apache.org/jira/browse/LUCENE-1705
 Project: Lucene - Java
  Issue Type: Wish
  Components: Index
Affects Versions: 2.4
Reporter: Tim Smith
 Attachments: IndexWriterDeleteAll.patch, LUCENE-1705.patch


 Ideally, there would be a deleteAllDocuments() or clear() method on the 
 IndexWriter
 This method should have the same performance and characteristics as:
 * currentWriter.close()
 * currentWriter = new IndexWriter(..., create=true,...)
 This would greatly optimize a delete all documents case. Using 
 deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large 
 existing index.
 IndexWriter.deleteAllDocuments() should have the same semantics as a 
 commit(), as far as index visibility goes (new IndexReader opening would get 
 the empty index)
 I see this was previously asked for in LUCENE-932, however it would be nice 
 to finally see this added such that the IndexWriter would not need to be 
 closed to perform the clear as this seems to be the general recommendation 
 for working with an IndexWriter now
 deleteAllDocuments() method should:
 * abort any background merges (they are pointless once a deleteAll has been 
 received)
 * write new segments file referencing no segments
 This method would remove one of the final reasons i would ever need to close 
 an IndexWriter and reopen a new one 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org



[jira] Updated: (LUCENE-1705) Add deleteAllDocuments() method to IndexWriter

2009-06-22 Thread Tim Smith (JIRA)

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

Tim Smith updated LUCENE-1705:
--

Attachment: IndexWriterDeleteAll.patch

Here's a patch adding a deleteAll() method (based on internalRollback())

Patch includes tests.

deleteAll() method can be rolled back (if IndexWriter supports rollback)

This seems to work quite nicely

please comment if there are any edge cases not being handled.

 Add deleteAllDocuments() method to IndexWriter
 --

 Key: LUCENE-1705
 URL: https://issues.apache.org/jira/browse/LUCENE-1705
 Project: Lucene - Java
  Issue Type: Wish
  Components: Index
Affects Versions: 2.4
Reporter: Tim Smith
 Attachments: IndexWriterDeleteAll.patch


 Ideally, there would be a deleteAllDocuments() or clear() method on the 
 IndexWriter
 This method should have the same performance and characteristics as:
 * currentWriter.close()
 * currentWriter = new IndexWriter(..., create=true,...)
 This would greatly optimize a delete all documents case. Using 
 deleteDocuments(new MatchAllDocsQuery()) could be expensive given a large 
 existing index.
 IndexWriter.deleteAllDocuments() should have the same semantics as a 
 commit(), as far as index visibility goes (new IndexReader opening would get 
 the empty index)
 I see this was previously asked for in LUCENE-932, however it would be nice 
 to finally see this added such that the IndexWriter would not need to be 
 closed to perform the clear as this seems to be the general recommendation 
 for working with an IndexWriter now
 deleteAllDocuments() method should:
 * abort any background merges (they are pointless once a deleteAll has been 
 received)
 * write new segments file referencing no segments
 This method would remove one of the final reasons i would ever need to close 
 an IndexWriter and reopen a new one 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org