[ 
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.

Reply via email to