You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by he...@gsa.gov on 2007/07/20 17:52:44 UTC

Rebuilding search index appears to be inconsistent

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.

Henry Chang
USA.gov Technologies IT Specialist
Office of Citizen Services and Communications [OCSC]
General Services Administration [GSA]
1800 F Street, NW
Washington, DC 20405
Cell: (202) 834-0235
Office: (202) 219-1801

Re: Rebuilding search index appears to be inconsistent

Posted by he...@gsa.gov.
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: henry.chang@gsa.gov





"Dave" <sn...@gmail.com> 
07/23/2007 10:29 AM
Please respond to
dev@roller.apache.org


To
dev@roller.apache.org
cc

Subject
Re: Rebuilding search index appears to be inconsistent






On 7/20/07, henry.chang@gsa.gov <he...@gsa.gov> 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



Re: Rebuilding search index appears to be inconsistent

Posted by Dave <sn...@gmail.com>.
On 7/20/07, henry.chang@gsa.gov <he...@gsa.gov> 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