[opencms-dev] Customise search ERROR [OpenCMS 6.0] (resend)

Andras Balogh abalogh at gmail.com
Fri Jul 29 13:25:37 CEST 2005


Hello David,

Have You considered using another approach? A solution would be to use a 
global search each time and filter out
the results based on the list of files you have at runtime. It would 
require some work since the paging functionality will
not work but i think it might work better than what you are trying to 
achieve now.
I have never tested it but i have a feeling creating indexes "on the 
fly" for each site user search it will be  an overkill.

Best regards,
Andras.

David wrote:

> Hi,
>  
> I am trying to customise the search behaviour in OpenCMS such that to 
> allow an application to dynamically create a new index source and 
> search index from an arbitrary set of files in VFS and perform a 
> search on those files. The code that I am using is given below. When I 
> run this from a JSP page it returned with an error saying /No analyzer 
> found for language "null". /The trace log for this error is given at 
> the bottom which points to method getAnalyzer() in CmsSearchManager. 
> So I checked the source code of this method and it looks perfectly 
> normal given that I already set the locale for my CmsSearchIndex 
> object to 'en'. I even test printing out the analyzer class name (see 
> code) using getAnalyzers() method of the CmsSearchManager to make sure 
> that analyzer for 'en' locale exists.
>  
> So the analyzer is there and the locale has been set for the 
> CmsSearchIndex object, why does it still complain about the analyzer 
> being not found and weird enough in the error message it seems not 
> able to detect the locale ("null" value)? Has anyone experienced this 
> before and perhaps could provide some insights? Thanks very much for 
> your prompt response.
>  
> Rgds,
> David.
>  





More information about the opencms-dev mailing list