[ 
https://issues.apache.org/jira/browse/JSPWIKI-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17205444#comment-17205444
 ] 

FP commented on JSPWIKI-1131:
-----------------------------

I built 43a15c85600d33054eec8fea8c7b622dd582d493 via `mvn clean package` and 
updated our installation. The exception when a user saves the page is now gone. 
But I noticed the following:
 * New pages are indexed immediately: created a new page »TestLucene1« and 
provided the following content: »correct horse battery staple«. The search for 
each of the words above presented the »TestLucene1« page.
 * Edited 3 randomly selected pages and also added the content »correct horse 
battery staple« to them. The search for each of the words above found the page 
»TestLucene1« as before but none of the randomly edited pages.

One of the 3 edited pages is called »Changelogs«. With debugging enabled, I can 
see these lines in the log:
{code:java}
[...]
[JSPWiki Lucene Indexer] DEBUG org.apache.wiki.WatchDog - JSPWiki Lucene 
Indexer: Entering state Emptying index queue, expected completion in 60 s
[JSPWiki Lucene Indexer] DEBUG org.apache.wiki.search.LuceneSearchProvider - 
Updating Lucene index for page 'Changelogs'...
[JSPWiki Lucene Indexer] DEBUG org.apache.wiki.search.LuceneSearchProvider - 
Indexing Changelogs...
[JSPWiki Lucene Indexer] DEBUG 
org.apache.wiki.providers.CachingAttachmentProvider - Listing attachments for 
WikiPage [Wiki:Changelogs,ver=137,mod=Thu Oct 01 13:58:29 CEST 2020]
[JSPWiki Lucene Indexer] DEBUG 
org.apache.wiki.providers.CachingAttachmentProvider - LIST from cache, 
Changelogs, size=8
[JSPWiki Lucene Indexer] DEBUG org.apache.wiki.search.LuceneSearchProvider - 
Done updating Lucene index for page 'Changelogs'.
[JSPWiki Lucene Indexer] DEBUG org.apache.wiki.WatchDog - JSPWiki Lucene 
Indexer: Exiting state Emptying index queue
[...]{code}
In my opinion, the search results should pop up as soon as indexing is complete 
as depicted in the logs. This is not the case.

> Lucene Index not updated on edits/new page
> ------------------------------------------
>
>                 Key: JSPWIKI-1131
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-1131
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.11.0-M7
>         Environment: * Debian 10
>  * Tomcat 9: 9.0.31-1~deb10u2
>  * OpenJDK-JRE 11: 11.0.7+10-3~deb10u1
>  * JSPWiki 2.11.0-M7
>            Reporter: FP
>            Priority: Critical
>         Attachments: exception.txt
>
>
> It seems that the lucene search index is not updated when a user edits an 
> existing page or creates a new page. In both cases, the page is not found 
> when someone searches for it.
> Search works as expected when:
>  * Tomcat is stopped
>  * The files in the {{lucene}} directory are removed
>  * Tomcat is started
>  * Wait until the Lucene Indexer thread finishes reindexing
> The following exception occurs when a page is edited (full stack trace 
> attached):
> {{java.io.NotSerializableException: org.apache.wiki.WikiContext}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to