mirror of https://github.com/apache/lucene.git
example shouldn't use deprecated method
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@478045 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ba7a8e612
commit
ad93748d49
|
@ -100,7 +100,8 @@ import java.util.Map;
|
|||
* MemoryIndex index = new MemoryIndex();
|
||||
* index.addField("content", "Readings about Salmons and other select Alaska fishing Manuals", analyzer);
|
||||
* index.addField("author", "Tales of James", analyzer);
|
||||
* float score = index.search(QueryParser.parse("+author:james +salmon~ +fish* manual~", "content", analyzer));
|
||||
* QueryParser parser = new QueryParser("content", analyzer);
|
||||
* float score = index.search(parser.parse("+author:james +salmon~ +fish* manual~"));
|
||||
* if (score > 0.0f) {
|
||||
* System.out.println("it's a match");
|
||||
* } else {
|
||||
|
|
Loading…
Reference in New Issue