Allow me to be more specific on deleting an entry. The following is based
on Roller 3.1.
Delete an entry calls WeblogEntryFormAction.remove() method. The source
code and comments show the author attempted to reindex but the deleted
entry is still searchable after the deletion.
I think the problem is in a private method
WeblogEntryFormAction.reindexEntry(). The author commented out the code
which removes the deleted entry from index. The method is quoted below for
your reference.
/**
* Attempts to remove the Entry from the Lucene index and
* then re-index the Entry if it is Published. If the Entry
* is being deleted then mark it published = false.
* @param entry
*/
private void reindexEntry(Roller roller, WeblogEntryData entry)
throws RollerException {
IndexManager manager = roller.getIndexManager();
// remove entry before (re)adding it, or in case it isn't
Published
//manager.removeEntryIndexOperation(entry);
// if published, index the entry
if (entry.isPublished()) {
manager.addEntryReIndexOperation(entry);
}
}
Is it a known problem in 3.1? Will it be fixed in 4.0?
Thanks,
Henry Chang
IT Specialist
USA.gov Technologies
General Services Administration
Office Phone: 202-219-1801
E-mail: [EMAIL PROTECTED]
"Dave" <[EMAIL PROTECTED]>
07/23/2007 10:29 AM
Please respond to
[email protected]
To
[email protected]
cc
Subject
Re: Rebuilding search index appears to be inconsistent
On 7/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Rebuilding search index appears to be inconsistent under different
> conditions.
> CONDITION REBUILD SEARCH INDEX
> 1 Add new entry YES
> 2 Modify existing entry YES
> 3 Delete entry NO
> 4 Approve comment NO
> 5 Delete comment NO
> Is it by design or oversight? If it is by design, what is the reason?
> Please advise.
It is my understanding that we only rebuild the search index when it
has become corrupt. Are you referring to a specific Lucene call that
is made on entry add/modify?
- Dave