From ad93748d492bc57efeb6eda8b33c3cf14a2a4b12 Mon Sep 17 00:00:00 2001 From: Wolfgang Hoschek Date: Wed, 22 Nov 2006 05:56:08 +0000 Subject: [PATCH] example shouldn't use deprecated method git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@478045 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/java/org/apache/lucene/index/memory/MemoryIndex.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java b/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java index dc293ec5f29..694901602ba 100644 --- a/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java +++ b/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java @@ -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 {