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:
Wolfgang Hoschek 2006-11-22 05:56:08 +00:00
parent 9ba7a8e612
commit ad93748d49
1 changed files with 2 additions and 1 deletions

View File

@ -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 {