<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi farnaz,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>you need to change the file BodyLessDocument.java
under net.grcomputing.lucence..... something.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Note: you should lucene1.5 which contains good code
not supported in lucene.1.2 pakage.</FONT></DIV>
<DIV><FONT face=Arial size=2>i am using that only.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Properties props = new
Properties();<BR> try {<BR> props.load(new
FileInputStream(CmsBase.getBasePath()+"config/opencms.properties")); <BR> }catch(Exception
e) {<BR> System.out.println("proprties file could not load
correctly.");<BR> e.printStackTrace();<BR> }<BR> docprops=props.getProperty("docproperty");<BR> StringTokenizer
tokens = new StringTokenizer(docprops,",");<BR> int numberOfTokens =
tokens.countTokens();<BR> int i = 0;<BR> String property =
"";<BR> String propvalue =
"";<BR> while(i<numberOfTokens){<BR> property =
tokens.nextToken();<BR> System.out.println("prperty-->"+property);<BR> if((propvalue
= cmso.readProperty(absPath, property)) != null)
{<BR> System.out.println("propvalue-->"+propvalue);<BR> doc.add(Field.Text(property,propvalue
));<BR> doc.add(Field.UnStored(FIELD_BULK,
propvalue));<BR> }<BR> i++;
<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>since i've configured that in such a way that u can
define properties needs to b indexed can be added in properties files. this is
code if you want </FONT></DIV>
<DIV><FONT face=Arial size=2>to add the fields directly into code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>you can add this.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>String title, description, keywords,
author;<BR> </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if((title = cmso.readProperty(absPath,
"title")) != null) {<BR> doc.add(Field.Text(FIELD_TITLE,
title));<BR> doc.add(Field.UnStored(FIELD_BULK,
title));<BR> }<BR> if((description =
cmso.readProperty(absPath, "description")) != null)
{<BR> doc.add(Field.Text(FIELD_DESC,
description));<BR> doc.add(Field.UnStored(FIELD_BULK,
description));<BR> }<BR> if((keywords =
cmso.readProperty(absPath, "keywords")) != null)
{<BR> doc.add(Field.Text(FIELD_KEYWORDS,
keywords));<BR> doc.add(Field.UnStored(FIELD_BULK,
keywords));<BR> }<BR> if((author =
cmso.readProperty(absPath, "author")) != null)
{<BR> doc.add(Field.Text(FIELD_AUTHOR,
author));<BR> doc.add(Field.UnStored(FIELD_BULK,
author));<BR> }<BR> if((author =
cmso.readProperty(absPath, "value")) != null)
{<BR> doc.add(Field.Text("value",
author));<BR> doc.add(Field.UnStored(FIELD_BULK,
author));<BR> }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>regds,</FONT></DIV>
<DIV><FONT face=Arial size=2>hitesh.</FONT></DIV>
<DIV><FONT face=Arial size=2>s/w consultant,</FONT></DIV>
<DIV><FONT face=Arial size=2>Tata Infotech Ltd.</FONT></DIV>
<DIV><FONT face=Arial size=2>mob: 919892678844.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=f_fotrousi@yahoo.com href="mailto:f_fotrousi@yahoo.com">Farnaz
Fotrousi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=opencms-dev@opencms.org
href="mailto:opencms-dev@opencms.org">opencms</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 05, 2004 5:56
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [opencms-dev] Results in lucene
module</DIV>
<DIV><BR></DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I am using lucene 1.2 module for search in opencms5.1 .
"simple_search.jsp" was the file that I used for doing simple search in that
module. I can see search results successfully. but the title of any
result is "untitled" and description is "null" but I can see "last_modified"
in result's list and link to that resource works properly.</DIV>
<DIV>Can any one help me what is happened? </DIV>
<DIV><BR>Also I need to do advanced search by combination of some words. Does
some one have example for advanced search?</DIV>
<DIV><BR>Best Regards,<BR>Farnaz</DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR><A href="http://vote.yahoo.com">vote.yahoo.com</A> -
Register online to vote today!
<P>
<HR>
<P></P><BR><BR>_______________________________________________<BR>This mail is
send to you from the opencms-dev mailing list<BR>To change your list options,
or to unsubscribe from the list, please
visit<BR>http://mail.opencms.org/mailman/listinfo/opencms-dev</BLOCKQUOTE></BODY></HTML>