diff --git a/build.xml b/build.xml index ceb17905e54..d3841f71411 100644 --- a/build.xml +++ b/build.xml @@ -288,10 +288,13 @@ - + + + + @@ -299,6 +302,12 @@ + + + + + + diff --git a/src/java/overview.html b/src/java/overview.html index 075ce046024..adfcf832774 100644 --- a/src/java/overview.html +++ b/src/java/overview.html @@ -82,64 +82,64 @@ method. Some simple examples of code which does this are: -To demonstrate these, try: -
F:\> java demo.IndexFiles rec.food.recipes\soups -
adding rec.food.recipes\soups\abalone-chowder +To demonstrate these, try something like: +
> java -cp lucene.jar:demo/classes org.apache.lucene.IndexFiles rec.food.recipes/soups +
adding rec.food.recipes/soups/abalone-chowder
  [ ... ] -

F:\> java demo.SearchFiles +

> java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesSearchFiles
Query: chowder
Searching for: chowder
34 total matching documents -
0. rec.food.recipes\soups\spam-chowder +
0. rec.food.recipes/soups/spam-chowder
  [ ... thirty-four documents contain the word "chowder", "spam-chowder" with the greatest density.]

Query: path:chowder
Searching for: path:chowder
31 total matching documents -
0. rec.food.recipes\soups\abalone-chowder +
0. rec.food.recipes/soups/abalone-chowder
  [ ... only thrity-one have "chowder" in the "path" field. ]

Query: path:"clam chowder"
Searching for: path:"clam chowder"
10 total matching documents -
0. rec.food.recipes\soups\clam-chowder +
0. rec.food.recipes/soups/clam-chowder
  [ ... only ten have "clam chowder" in the "path" field. ]

Query: path:"clam chowder" AND manhattan
Searching for: +path:"clam chowder" +manhattan
2 total matching documents -
0. rec.food.recipes\soups\clam-chowder +
0. rec.food.recipes/soups/clam-chowder
  [ ... only two also have "manhattan" in the contents. ]
    [ Note: "+" and "-" are canonical, but "AND", "OR" and "NOT" may be used. ]

-The IndexHtml demo is more sophisticated.  +The IndexHtml demo is more sophisticated.  It incrementally maintains an index of HTML files, adding new files as they appear, deleting old files as they disappear and re-indexing files as they change. -
F:\>java demo.IndexHTML -create java\jdk1.1.6\docs\relnotes +
> java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesIndexHTML -create java/jdk1.1.6/docs/relnotes
adding java/jdk1.1.6/docs/relnotes/SMICopyright.html
  [ ... create an index containing all the relnotes ] -

F:\>del java\jdk1.1.6\docs\relnotes\smicopyright.html -

F:\>java demo.IndexHTML java\jdk1.1.6\docs\relnotes +

> rm java/jdk1.1.6/docs/relnotes/smicopyright.html +

> java -cp lucene.jar:demo/classes org.apache.lucene.IndexFilesIndexHTML java/jdk1.1.6/docs/relnotes
deleting java/jdk1.1.6/docs/relnotes/SMICopyright.html

HTML indexes are searched using SUN's JavaWebServer -(JWS) and Search.jhtml.  To use +(JWS) and Search.jhtml.  To use this:
  • @@ -158,7 +158,7 @@ launch JWS, with the demo directory on CLASSPATH (only one class is actually needed);
  • -visit Search.html.
  • +visit Search.html.
Note that indexes can be updated while searches are going on.  Search.jhtml will re-open the index when it is updated so that the latest version is