Lucene study notes (3)
Continue to learn the open source project of the car to provide the website full-text search.
Due to the incomplete document, this time I see the code is very bitter, almost a way to use the log4j class. It is gratifying that during the period, he said that he said to reinjug the source code and documentation of the entire project, it is estimated that the later people can easily.
In addition to the previously mentioned Chinese, the car joined many practical stuff in this project, such as forth, sort, summary, etc., even even the page expiration time, the limitations of the output format considered.
Here is my test page, let's take a look. Wait tomorrow, I put the source code DIFF, and I also hang up the modification documents I also give you reference.
On the resume of the car, there is a business search website. It is estimated that they have their own achievements, they can go see and help understand the function of this project. Below is to run Weblucene needs to make changes and descriptions.
WEBLUCENE /
| - Web-INF
| | - Classes
| | `- COM
| | `- Chedong
| | | | | - Weblucene
| | | - WebluceneadminServlet.java
| | | | - INDEX
| | | `- SAXINDEXER.JAVA
| | `- Search
| | `- WebluceneHighlight.java
| | - logs <----- This is a subdirectory,
The log file is in this directory when manually established.
| `- VAR
| `- APP
| | - INDEX <----- This is a subdirectory,
Place the index file here when manually established.
| | - Weblucene.xsl
| `- Wl.conf
| - INDEX.HTML
| - Style.css
`- Test.xml
Modifications to SAXINDEXER.JAVA will be two lines sb.Append ((String) it.next ())); change to two lines sb.Append (Lucenedoc.get ())) ;
For WebluceneHighlight.java, you will change both to to change both u> INS>
May be changed to change WebLuceneAdminServlet.java recommended logFileName = servletConfig.getServletContext () getRealPath ( "WEB-INF / logs /") logFileName;. To logFileName = servletConfig.getServletContext () getRealPath ( "WEB-INF / logs. / ") " / " Logfilename;
In addition to three Java programs, other files can be
Download here.
Before you have retrieved, you need to build an index first, and the command is as follows:
$ java indexrunner -i tt.xml -o web-inf / var / app / index / -t title, content -n author, Pubtime needs to say that it is estimated that the car will quickly launch a new practicality. Version, it is not used by the content it is available here. :)