Re: [Wyonacms-cvs-commit] lenya/src/java/org/lenya/lucene HTMLDocument.java,1.13,1.14
Christian Egli <[email protected]> 18 Mar 2003 11:03:36 +0100
| Newsgroups | gmane.comp.cms.wyona.devel |
|---|---|
| Message-ID | <[email protected]> |
Again, sorry to be so picky but I just wish you wouldn't just produce dead code (i.e. commented out code). If the code is no longer used then remove it. To see how the code looked before use CVS. At least mark it with a 'FIXME:' to say what this is about and why it is commented out. IMHO code that is commented out indicates poor code quality (which we don't want to imply, do we :-). Michael Wechner <[email protected]> writes: > Update of /repository/lenya/src/java/org/lenya/lucene > In directory erbium:/tmp/cvs-serv469/src/java/org/lenya/lucene > > Modified Files: > HTMLDocument.java > Log Message: > uses currently HTMLParser > > Index: HTMLDocument.java > =================================================================== > RCS file: /repository/lenya/src/java/org/lenya/lucene/HTMLDocument.java,v > retrieving revision 1.13 > retrieving revision 1.14 > diff -C2 -d -r1.13 -r1.14 > *** HTMLDocument.java 14 Mar 2003 16:07:01 -0000 1.13 > --- HTMLDocument.java 18 Mar 2003 07:43:42 -0000 1.14 > *************** > *** 151,154 **** > --- 151,155 ---- > > // Add the title as a separate Text field, so that it can be searched separately. > + /* > String title = htmlDoc.getTitle(); > > *************** > *** 158,166 **** > doc.add(Field.Text("title", "")); > } > > //System.out.println("HTMLDocument.getLuceneDocument(): title field added: " + title); > > ! // Add the tag-stripped contents as a Reader-valued Text field so it will > ! // get tokenized and indexed. > String body = htmlDoc.getBody(); > String contents = ""; > --- 159,170 ---- > doc.add(Field.Text("title", "")); > } > + */ > + > + doc.add(Field.Text("title", parser.getTitle())); > > //System.out.println("HTMLDocument.getLuceneDocument(): title field added: " + title); > > ! // Add the tag-stripped contents as a Reader-valued Text field so it will get tokenized and indexed. > ! /* > String body = htmlDoc.getBody(); > String contents = ""; > *************** > *** 172,175 **** > --- 176,182 ---- > > doc.add(Field.Text("contents", contents)); > + */ > + > + doc.add(Field.Text("contents", parser.getReader())); > > //System.out.println("HTMLDocument.getLuceneDocument(): contents field added: " + contents); -- Christian Egli [email protected] +41 1 272 9161 Wyona AG, Hardstrasse 219, CH-8005 Zurich Open Source CMS http://www.wyona.org http://www.wyona.com