[opencms-dev] Search engine
agrandemange at amadeus.net
agrandemange at amadeus.net
Thu Jan 30 17:22:32 CET 2003
Thomas, Alex,
After hacking a little bit I have now excerpts of one line. It still
doesn't work. Now I found that I had also to configure header.html.
Could you send me the header.html you used in your tests?
My guess is that you also used an empty footer.html. Am I wrong?
Best regards,
Alexis
From: agrandemange at amadeus.net@www.opencms.org on 28/01/2003 17:00
Please respond to opencms-dev at www.opencms.org
Sent by: owner-opencms-dev at www.opencms.org
To: opencms-dev at www.opencms.org
cc:
Subjec RE: [opencms-dev] Search engine
t:
Hi Thomas,
thank you for the explanation. I'm now a step further. Still the same error
but not for the same reason:
[28.01.2003 17:22:34] <opencms_info> Updated JSP file
"/WEB-INF/jsp/offline/ThtdigsearchTindex.html.-1611620409.jsp" for resource
"/htdigsearc
h/index.html"
[28.01.2003 17:22:35] <opencms_info> Updated JSP file
"/WEB-INF/jsp/offline/TsystemTmodulesTcom.alkacon.htdigTelementsTsearch_functions.jsp.13
75346473.jsp" for resource
"/system/modules/com.alkacon.htdig/elements/search_functions.jsp"
[28.01.2003 17:22:38] <opencms_info> [com.alkacon.htdig.HtdigBean]
java.lang.ArrayIndexOutOfBoundsException
[28.01.2003 17:22:38] <opencms_info> [com.alkacon.htdig.HtdigBean] htsearch
returned more lines in it's output than expected!
Please check the format of ${common_dir}/long.html
htsearch URL: http://ncegrid0/cgi-bin/htsearch
htsearch parameters: format=long&words=oracle&matchesperpage=10&restrict
=&config=opencms&page=1
current line: 0
Though I use the long.html listed in the module doc it fails. I looked at
the stream returned by htdig. Quite often I have lines like this:
>>
http://ncegrid1/oracle/doc/a85344/a85344/ch5.htm
Configuring Net8
<b><tt>... </tt></b> Intel: * Core Net8 Products and Features * Net8
Protocol Support * The BEQ Protocol * The IPC Protocol * The RAW Protocol *
The TCP/IP Protocol * <strong><a href
="http://ncegrid1/oracle/doc/a85344/a85344/ch5.htm#16264
">Oracle</a></strong>
Enterprise Manager * Configuring <strong>Oracle</strong> Intelligent Agent
for <strong>Oracle</strong> SNMP * <strong>Oracle</strong> Advanced
Security * Supplementary Documentation Core Net8 Products<b><tt>
...</tt></b>
44792
38
01/17/2001
>>
It is quite correct except for the excerpt which is made of two lines (It
might be displayed on more lines with your mailing tool).
But the code assumes that the excerpt contains exactly one line:
// the URL of the search result
searchResultUrl = htsearchOutput[currentLine];
// the title
String searchResultTitle = htsearchOutput[currentLine + 1];
// the excerpt
String searchResultExcerpt = htsearchOutput[currentLine + 2];
// the size (in kBytes)
searchResultSize = Integer.parseInt(htsearchOutput[currentLine + 3]);
// the hit rate (in percent)
searchResultHitRate = Integer.parseInt(htsearchOutput[currentLine + 4]);
// the last modified date string
String searchResultLastModifiedTimestamp = htsearchOutput[currentLine + 5];
// the type of the URL resource (might be a PDF!)
int resourceType = HtdigBean.C_RESULT_TYPE_DEFAULT;
Actually with the long.html setting in the doc the excerpt is one or more
lines long.
Is it something I can set to circumvent the problem? Otherwise we need to
put something special in the long.html after $(EXCERPT) and adds lines to
the excerpt up to this special thing. Do you see another solution?
Best regards,
Alexis
From: Thomas Weckert <t.weckert at alkacon.com>@www.opencms.org on
27/01/2003 22:58
Please respond to opencms-dev at www.opencms.org
Sent by: owner-opencms-dev at www.opencms.org
To: opencms-dev at www.opencms.org
agrandemange at amadeus.net
cc:
Subjec RE: [opencms-dev] Search engine
t:
Hi Alexis,
it seems to me as if there is a typo in your htsearch URL. The htdig
documentation for the config input parameter of the htsearch command
says: "The name here is the name without the path and without the
.conf at the end.". So config=htdig instead of config=htdig.conf
would do the job. Use setHtsearchConfig() in HtdigBean to set the
name of the config file before you invoke search().
Regards,
/Thomas
Thomas Weckert
Alkacon Software - The OpenCms Experts
http://www.alkacon.com
Quoting agrandemange at amadeus.net:
>
> Alex,
>
> My opencms was in a poor condition between beta1 and RC1. Now it still
> doesn't work but in a much cleaner way.
> I get a "Our search database is currently maintenanced, please try again
> later." message.
> I looked at the query string in the code,
> In my case it generates
> http://localhost/cgi-bin/htsearch?
format=long&words=oracle&matchesperpage=10&restrict
>
> &config=htdig.conf&page=1.
> I tried on the browser and htdig 3.16 returns "Unable to read
configuration
> file" though my htdig config file is htdig.conf.
> If I query
> http://localhost/cgi-bin/htsearch?
format=long&words=oracle&matchesperpage=10&restrict
>
> &page=1 (remove the config parameter) it works.
> Do you have an idea?
> I could remove the config parameter from the code but I find this
parameter
> handy. The OpenCms long.html setting is not suitable for browser queries.
> It would really help having two or more configs.
>
> Regards,
> Alexis
>
>
>
> From: "Alexander Kandzior" <alex at opencms.org>@www.opencms.org on
> 10/01/2003 18:43
>
> Please respond to opencms-dev at www.opencms.org
>
> Sent by: owner-opencms-dev at www.opencms.org
>
>
>
> To: <opencms-dev at www.opencms.org>
>
>
> cc:
>
>
>
>
>
>
> Subjec RE: [opencms-dev] Search engine
> t:
>
>
>
>
>
>
>
>
> Alexis,
>
> you can download the pre-release version of the JSP/htdig search module
> here:
>
> http://www.opencms.info/download/com.alkacon.htdig_4.zip (OpenCms
> module)
> http://www.opencms.info/download/com.alkacon.htdig_4_src.zip (Source
> code)
>
> To run the search engine integration you just need the module, it
> contains the compiled java classes. Download the file and import it in
> OpenCms using the "Module Management" feature in the "Administration"
> view. You must be in the "Online" project to do this.
>
> You must restart the OpenCms/Tomcat server after installing the module.
>
> After installing the module you have a directory "/htdigsearch/" which
> contains a demo search page and some configuration hints. You still will
> need to read the ht:dig documentation on how to install ht:dig first.
>
> This will work only with OpenCms 5.0rc1. You need to have the
> "org.opencms.welcome" module installed (this is the default).
>
> Any feedback about this module is appreciated.
>
> Best Regards,
> Alex.
>
> Alexander Kandzior
> Alkacon Software
> http://www.alkacon.com
>
>
> > -----Original Message-----
> > From: owner-opencms-dev at www.opencms.org
> > [mailto:owner-opencms-dev at www.opencms.org] On Behalf Of
> > agrandemange at amadeus.net
> > Sent: Friday, January 10, 2003 2:14 PM
> > To: opencms-dev at www.opencms.org
> > Subject: RE: [opencms-dev] Search engine
> >
> >
> >
> > Alexander,
> >
> > yes please send me the htdig module. As I run Linux htdig
> > should be fine.
> >
> > Best regards,
> > Alexis
> >
> >
> >
> > From: "Alexander Kandzior" <alex at opencms.org>@www.opencms.org on
> > 10/01/2003 11:21
> >
> > Please respond to opencms-dev at www.opencms.org
> >
> > Sent by: owner-opencms-dev at www.opencms.org
> >
> >
> >
> >
> > To: <opencms-dev at www.opencms.org>
> >
> >
> >
> >
> >
> > cc:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Subjec RE: [opencms-dev] Search engine
> >
> > t:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Alexis,
> >
> > I know of no plans to update the Lucene based search modules
> > for OpenCms 5. We have a new JSP based module for htdig
> > integration, but we will be publish this in a couple of weeks
> > as we are still working on the documentation. If you want I
> > can mail this directly to you now. You might also be able to
> > integrate Lucene based on this.
> >
> > Best Regards,
> > Alex.
> >
> > Alexander Kandzior
> > OpenCms Group / Alkacon Software
> >
> > > -----Original Message-----
> > > From: owner-opencms-dev at www.opencms.org
> > > [mailto:owner-opencms-dev at www.opencms.org] On Behalf Of
> > > agrandemange at amadeus.net
> > > Sent: Thursday, January 09, 2003 6:32 PM
> > > To: opencms-dev at opencms.com
> > > Subject: [opencms-dev] Search engine
> > >
> > >
> > > Hi,
> > >
> > > we use OpenCms 5 RC 1 and we need to add a search facility
> > (preferably
> > > Lucene-based.)
> > > Which one should we use? The one at
> > > http://www.opencms.com/opencms/opencms/communi>
> > ty/lucene.html or the
> > > one at http://www.opencms.com/opencms/opencms/service/modules.html?
> > > If none of them is known to work with OpenCms 5, is it a plan
> > > for a new version of this module? If needed I can contribute
> > > but I would like to have the best starting point.
> > >
> > > Regards,
> > > Alexis
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
>
--
Thomas Weckert
Alkacon Software GbR
Im Meisengrund 4a
50996 Koeln, DE
Tel: +49 (0)2236 963491
Fax: +49 (0)2236 963492
Email: thomas at alkacon.com
http://www.alkacon.com
More information about the opencms-dev
mailing list