You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by "Kurt Stein (JIRA)" <ji...@apache.org> on 2009/02/09 16:31:02 UTC

[jira] Created: (JSPWIKI-498) Performance Issues with Lucene Index

Performance Issues with Lucene Index
------------------------------------

                 Key: JSPWIKI-498
                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
             Project: JSPWiki
          Issue Type: Bug
          Components: Default template
    Affects Versions: 2.8.1
         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
            Reporter: Kurt Stein


Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.

I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
Once in search.jsp and afterwards in AjaxSearch.jsp.

The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt Stein updated JSPWIKI-498:
-------------------------------

    Attachment: patch_lucene_search.txt

OK, I have finished my work. 

This one fixes the search dilemma for LuceneSearchProvider described above.

Additionally it shows all pages for a query. But it shows secret content(user without pagepermission) only to authorized users.

Reason: We often have users saying: This is not in the wiki. But it is in the wiki, they are just not authorized.(We still need a little bit of internalization for this piece of code).

This way, they see there is a page an so they can ask the admin for access to this page. 

As soon as they changes are accomplished I will provide my search template. But i don´t want to mix to much code for you at one time.

PS: There is a dependency in LuceneSearchProvider for PDBox because I am actually indexing my pdf files ;-) I think this is a good part to get pdf indexed so I commit this too.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672568#action_12672568 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

The problem is as long as I don't get the trunk started (Because of all the  pending JCR stuff) to see what I am doing I prefer to work on the branches.

So i will make my patch working on JSPWIKI_2_8_BRANCH.

So you want the JSP-Page to call the Searchmanger and not the wikiengine to perform the search?

In general I think it would be best to make the call from AjaxSearch.jsp and Search.jsp the same way to reduce duplicate code.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673511#action_12673511 ] 

Harry Metske commented on JSPWIKI-498:
--------------------------------------

Kurt,
a bit more room for improvement still:

* name your patch files properly, using the .patch suffix (makes handling easier with most editors, and gives automatic correct syntax highlighting)
* some parameter names do not adhere to the standards
* method docs are incomplete
* please use the JSPWiki code formatting (http://www.jspwiki.org/wiki/JSPWikiCodingStandard).
* an unnecessary import of StopWatch in Search.jsp
* there is still a findPages(String,int,int) left in WikiEngine
* is it possible to include one or more JUnit tests (to reduce the chance that we break your work in the future) ?

Another suggestion: Have you tried using the Eclipse CheckStyle plugin ?

thanks,
Harry

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674342#action_12674342 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

I don't understand - SearchProvider.findPages() returns a Collection. There is no need to synchronize anything; they're already correct.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harry Metske updated JSPWIKI-498:
---------------------------------

        Fix Version/s: FutureVersion
    Affects Version/s: 2.8.4
                           (was: FutureVersion)

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.4
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>             Fix For: FutureVersion
>
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673592#action_12673592 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Yupyup, we do recognize this as a problem, but unfortunately there are some ground rules we *have* to follow, or else we will simply lose the ability to maintain the code.  One of these are the code style instructions; the other one is maintaining the compatibility rules.  For example, if someone has written their own SearchProvider, and we casually break the interface, they will have to fix it in order to take a new minor release into use.  In many corporate environments, this may be difficult.

One possibility is to create a PaginatingSearchProvider interface, which has the findPages(String,int,int) method, and have LuceneSearchProvider implement that in addition to the regular SearchProvider interface.  SearchManager can then provide a findPages(String,int,int) method which checks whether the given SearchProvider implements this PaginatingSearchProvider, and functions accordingly.

And yes, the JSP files should call SearchManager directly.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671925#action_12671925 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

Update to my Research on LuceneSearchProvider.

I added some Stopwatches to see where the bottleneck is. It is the LuceneHighlighter!

The Problem is the part where it is getting the fragments for all searchresults. 

This is unessesary because the page only displays the first 20 Searchresults(1-20).

And if you go to the next page JSPWIKI start a new query but displays only results 21-40.

In my case i had 500 results which took me 30 seconds, I dont want this to happen on a Wiki with more than 10000 pages as Searchresult.

Suggestion: 
1.Transmit the "resultsdisplayed" parameter *pagesize* as *HitLength* from 
AjaxSearch.jsp :
{quote} 
wiki:SetPagination start="${param.start}" total="<%=list.size()%>" pagesize="20")
{quote}

2.And then call the *LuceneSearchProvider.findPages(query, flags, startFromHit, HitLength)*

3.Get only the fragments from *startFromHi * till *startFromHi* + *HitLength*


What do you think?

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674421#action_12674421 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

Yes I know, but whats about the Generics you told me? All the stuff that is within the Collection? Collection<Arraylist<SearchResult>>

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt Stein updated JSPWIKI-498:
-------------------------------

    Attachment: lucene_search.patch

TODO: Generics for BasicSearchProvider and LuceneSearchProvider need to be synchronized.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863028#action_12863028 ] 

Harry Metske commented on JSPWIKI-498:
--------------------------------------

Kurt,

it's a long time ago, but can we still expect patches ?
If not, I'd like to close this issue.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672562#action_12672562 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Sorry :-/. Didn't mean to devastate you...  But it's in everybody's interest if we get good patches!

WikiEngine is too fat as it is, so the current trend is to enhance the Managers instead of WikiEngine with new methods.  The old methods in WikiEngine are there for backwards compatibility, and new methods should be added to the relevant Manager class.

All new major features should be based on the trunk.  Minor features and updates should go to the JSPWIKI_2_8_BRANCH.  It's okay to break binary compatibility in the trunk, but for 2.8 it's a no-no.

For example, the addition of PDFBox should be against trunk, but speed optimizations should be against the 2.8 branch.

In general, the smaller the patch, the better.  A really big patch may have side-effects which cause massive problems down the line, so in general we don't like those (unless we're sure that you know what you're doing - but in that case you're probably already a committer).


> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674008#action_12674008 ] 

Harry Metske commented on JSPWIKI-498:
--------------------------------------

That is correct, there are many more sources that are not according to JSPWiki code style (JSPWiki is a long existing project).
So you should not format a complete source if you supply a patch, just select the piece of code you added, and then format it.
If you want to format the whole source, do that in a separate patch.

thanks,
Harry

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674029#action_12674029 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Also, the eclipse codestyle is not necessarily completely up-to-date.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674696#action_12674696 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Nonono, not that one.  You replaced some internal generics, not the API signatures :-).  Those are still fine without generics (we're generifying them for 3.0).

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harry Metske updated JSPWIKI-498:
---------------------------------

    Affects Version/s: FutureVersion
                           (was: 2.8.1)

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: FutureVersion
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: lucene_search.patch, patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673582#action_12673582 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

Ok 2 Issues. 
First. This is a really heavy bottleneck for performance. If there is any way to avoid the Interface I will do so. But I don´t see the point. And I really want a fix for 2.8 Versions (Saying that for JSPWiki Community because my Wiki-Server has the fix and the search is running like a leopard)
Thus I need to pass these 2 additional paramters/variables to the LuceneSearchprovider. This leads to the second Issue. I can avoid using the wikiengine find(String,int,int) method. So do you want me to call the searchmanager directly from ajaxsearch.jsp and search.jsp ?

I will checkout your JPSwiki Styles but personally I dont like the linebreak in methodcalls (as I am working with a 22" Flatscreen -overview is not a issue)

PS: The stopwatch in search.jsp import can be removed. I think it is some legacy  from my tests for finding the bottleneck. Can you please specify which paramters don´t adhere the standards?

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673595#action_12673595 ] 

Harry Metske commented on JSPWIKI-498:
--------------------------------------

We also very welcome performance improvements to searching, no discussions about that.

Just install the CheckStyle plugin, and it will tell you all code style violations. And again, just minor things, easy to fix.
For example:
* the casing of method parameters, for example : "int SearchItemAmount"  should be "int searchItemAmount".
* the following snippet:
{code}
     /**
     *  BasicSearchProvider needs to parse all pages, thus Start- and Endpoint are useless
     */
    public Collection<ArrayList<SearchResultImpl>> findPages( String query, int startShowFrom, int showAmount )
                                                                                                               throws ProviderException,
                                                                                                                   IOException

{code}
 could be:
{code}
    /**
     *  {@inheritDoc}
     */
    public Collection<ArrayList<SearchResultImpl>> findPages( String query, int startShowFrom, int showAmount )
                                                                                                               throws ProviderException,
                                                                                                                   IOException
{code}
* the following snippet seems to have been copy/pasted, but the added parameters are not in the method doc:
{code}
    /**
     *  Sends a search to the current search provider. The query is is whatever native format
     *  the query engine wants to use.
     *
     * @param query The query.  Null is safe, and is interpreted as an empty query.
     * @return A collection of WikiPages that matched.
     * @throws ProviderException If the provider fails and a search cannot be completed.
     * @throws IOException If something else goes wrong.
     */
    public Collection<ArrayList<SearchResultImpl>> findPages( String query ,int startSearchFrom ,int searchItemAmount )
        throws ProviderException, IOException
    {
{code}

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


Re: [jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by Christophe Dupriez <ch...@destin.be>.
Hi!

Beware that Lucene API is evolving (version 2.4) with basic classes like 
Hits becoming deprecated (supressed in future 3.0).
Stored data structure has also changed with automatic conversion taking 
place at first use (you must also upgrade your Luke: 
http://www.getopt.org/luke/)
   Even if they did not changed the major version number...
This seems to be for (future?) performance improvements in Lucene.

But, seriously, Lucene is already astonishingly performant.
Some caching of search hits number can be useful if a search is often 
repeated to help users within an Auto-complete (this cache must be 
thrown away when Lucene IndexWriter is called but, in a Wiki, pages are 
much more often read than writen).

Have a nice w.e.!

Christophe


Harry Metske (JIRA) a écrit :
>     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673598#action_12673598 ] 
>
> Harry Metske commented on JSPWIKI-498:
> --------------------------------------
>
> And again, JUnit tests is also very important. 
> JSPWiki currently has 1049 JUnit tests, and this really helps preventing us breaking things.
> This has been a serious investment and we profit from that every day. We want to keep relying on it.
>
>   
>> Performance Issues with Lucene Index
>> ------------------------------------
>>
>>                 Key: JSPWIKI-498
>>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>>             Project: JSPWiki
>>          Issue Type: Bug
>>          Components: Default template
>>    Affects Versions: 2.8.1
>>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>>            Reporter: Kurt Stein
>>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>>
>>
>> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
>> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
>> Once in search.jsp and afterwards in AjaxSearch.jsp.
>> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.
>>     
>
>   


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Harry Metske (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673598#action_12673598 ] 

Harry Metske commented on JSPWIKI-498:
--------------------------------------

And again, JUnit tests is also very important. 
JSPWiki currently has 1049 JUnit tests, and this really helps preventing us breaking things.
This has been a serious investment and we profit from that every day. We want to keep relying on it.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673853#action_12673853 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

Sure unitTest are important. I will add one if I get behind the magic of unitTests. 

I have imported the wiki codestyles into eclipse and run "format" on LuceneSearchProvider. This stuff has corrupted the complete class by adding a lot of whitespace everywhere(even code I havn´t touch).

Seems to me that the LuceneSearchProvider is not conform with the JSPWikistyle...or I am using the style formatter in an unappropriate way.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt Stein updated JSPWIKI-498:
-------------------------------

    Attachment: patch_lucene_search_2.txt

This is a pure patch for this issue. I will open more issue to improve the Wiki-Search functionality.

I hope I have merged all the necessary stuff. :-)

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Updated: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kurt Stein updated JSPWIKI-498:
-------------------------------

    Attachment: screenshot-1.jpg

Result

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672550#action_12672550 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

Yoe totally destroyed me. But this is OK. Thanks for your comments.

I have a few questions regarding to your points.

*SearchMatcher needs to be augmented with a new routine breaking binary and source compatibility
-->It is because The not authorized need to be implemnted for SearchMatcher too. Actually it is not part of the patch, so i will leave it out. For this patch.

*WikiEngine.findPages(String,int,int) should be in SearchManager.
-->dont understand this part. Where is the problem?

Do you have a Java class where you use localization. I can only find it in JSP Pages.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672391#action_12672391 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

I see at least the following problems with this patch:

* SearchMatcher.notAuthorized() is not localized.
* The patch does not adhere to JSPWiki coding guidelines (e.g. the use of tabs instead of spaces, curly braces and so on)
* I don't understand why SearchMatcher needs to be augmented with a new routine breaking binary and source compatibility (big no-no for patch releases)
* WikiEngine.findPages(String,int,int) should be in SearchManager.
* LuceneSearchProvider is relicensed under LGPL
* There is a dependency to PDFBox (this should be a separate issue and patch)
* Generics are replaced with non-generics (undoing the work we did for 2.8)
* Some old bugs are reintroduced by failing to catch exceptions properly
* There is some strange "owiki.tld" being included in AjaxSearch.jsp
* The patch is way too big to be examined properly - there are lots of changes to AjaxSearch.jsp for example, most of look like reindentation.

All in all, a strong -1 from me for this patch.  Please clean it up and make it really short and sweet so that it can be properly reviewed.

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674227#action_12674227 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

I was beatifying my code and I noticed, that Lucensearchprovider returns a Collection with ArrayList<SearchResult> and BasicSearchProvider a TreeSet<SearchResult>.

I need to unify them for the SeachProvider Interface, so which one do you want to keep?
BasicSearchprovider seems to need the sorting and LuceneSearchprovider gets the sorting from the LuceneIndex.

I give you the patch and you can go the last mile...

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Kurt Stein (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672556#action_12672556 ] 

Kurt Stein commented on JSPWIKI-498:
------------------------------------

An other questions. There are a lot of brnaches. On codebase of which branch should I do the patch?

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12673530#action_12673530 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Also, this extends SearchProvider interface.  We can't do that in a minor release - it needs to go either to 2.9 or 3.0 (and considering that there is no 2.9, I think this patch needs to be against 3.0, or be refactored not to change existing interfaces).

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>         Attachments: patch_lucene_search.txt, patch_lucene_search_2.txt, screenshot-1.jpg
>
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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


[jira] Commented: (JSPWIKI-498) Performance Issues with Lucene Index

Posted by "Janne Jalkanen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JSPWIKI-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671962#action_12671962 ] 

Janne Jalkanen commented on JSPWIKI-498:
----------------------------------------

Sounds okay to me (except that the findPages(query,flags) needs to be retained for API compatibility, so you need to overload findPages().

In addition, I don't like AjaxSearch.jsp.  It should really be completely integrated with SearchManager.  Our entire search is currently a hodgepodge of things, and someone should go and clean the whole thing up...

> Performance Issues with Lucene Index
> ------------------------------------
>
>                 Key: JSPWIKI-498
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-498
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Default template
>    Affects Versions: 2.8.1
>         Environment: Win 2003 on XEN-Server, 3 GB RAM, 4 x Intel Xeon 2Ghz
>            Reporter: Kurt Stein
>
> Our Wiki-Luceneindex has swollen to 33 MB and if someone searches words like "find" he gets about 500 results. Only problem is, it takes about 30 seconds to complete the search.
> I have looked a bit into the problem and there is something strange to me. JSPWiki searches twice every query. 
> Once in search.jsp and afterwards in AjaxSearch.jsp.
> The filteredList from search.jsp is written to the pagecontext but this information is never read within the AjaxSearch.jsp. Thus AjaxSearch.jsp makes a second search.

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