mirror of https://github.com/apache/lucene.git
the demo was changed so that the "path" field isn't tokenized anymore: adapt the documentation to that change
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b6a2e7e56
commit
004407a688
|
@ -102,33 +102,23 @@ To demonstrate these, try something like:
|
|||
<blockquote><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.IndexFiles rec.food.recipes/soups</b></tt>
|
||||
<br><tt>adding rec.food.recipes/soups/abalone-chowder</tt>
|
||||
<br><tt> </tt>[ ... ]
|
||||
|
||||
<p><tt>> <b>java -cp lucene.jar:lucene-demo.jar org.apache.lucene.demo.SearchFiles</b></tt>
|
||||
<br><tt>Query: <b>chowder</b></tt>
|
||||
<br><tt>Searching for: chowder</tt>
|
||||
<br><tt>34 total matching documents</tt>
|
||||
<br><tt>0. rec.food.recipes/soups/spam-chowder</tt>
|
||||
<br><tt> </tt>[ ... thirty-four documents contain the word "chowder",
|
||||
"spam-chowder" with the greatest density.]
|
||||
<p><tt>Query: <b>path:chowder</b></tt>
|
||||
<br><tt>Searching for: path:chowder</tt>
|
||||
<br><tt>31 total matching documents</tt>
|
||||
<br><tt>0. rec.food.recipes/soups/abalone-chowder</tt>
|
||||
<br><tt> </tt>[ ... only thrity-one have "chowder" in the "path"
|
||||
field. ]
|
||||
<p><tt>Query: <b>path:"clam chowder"</b></tt>
|
||||
<br><tt>Searching for: path:"clam chowder"</tt>
|
||||
<br><tt>10 total matching documents</tt>
|
||||
<br><tt>0. rec.food.recipes/soups/clam-chowder</tt>
|
||||
<br><tt> </tt>[ ... only ten have "clam chowder" in the "path" field.
|
||||
]
|
||||
<p><tt>Query: <b>path:"clam chowder" AND manhattan</b></tt>
|
||||
<br><tt>Searching for: +path:"clam chowder" +manhattan</tt>
|
||||
<br><tt>1. rec.food.recipes/soups/spam-chowder</tt>
|
||||
<br><tt> </tt>[ ... thirty-four documents contain the word "chowder" ... ]
|
||||
|
||||
<p><tt>Query: <b>"clam chowder" AND Manhattan</b></tt>
|
||||
<br><tt>Searching for: +"clam chowder" +manhattan</tt>
|
||||
<br><tt>2 total matching documents</tt>
|
||||
<br><tt>0. rec.food.recipes/soups/clam-chowder</tt>
|
||||
<br><tt> </tt>[ ... only two also have "manhattan" in the contents.
|
||||
]
|
||||
<br><tt>1. rec.food.recipes/soups/clam-chowder</tt>
|
||||
<br><tt> </tt>[ ... two documents contain the phrase "clam chowder"
|
||||
and the word "manhattan" ... ]
|
||||
<br> [ Note: "+" and "-" are canonical, but "AND", "OR"
|
||||
and "NOT" may be used. ]</blockquote>
|
||||
|
||||
The <a href="../../src/demo/org/apache/lucene/demo/IndexHTML.java">IndexHtml</a> 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
|
||||
|
|
Loading…
Reference in New Issue