lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Restrict result returned by Morelikethis
Date Sat, 23 Dec 2006 23:18:04 GMT

You appear to be trying to use an old method from the java 1.4.3 API for
BooleanQuery, but i'm assuming you are acctually using Lucene 2.0 or 1.9
... take a look at the 2.0 javadocs for BooleanQuery and i think you'll
see how do what you are attempting...

http://lucene.apache.org/java/2_0_0/api/org/apache/lucene/search/BooleanQuery.html

(the approach you are taking towards your goal is sound by the way)

: Date: Sat, 23 Dec 2006 20:41:18 +0100
: From: Nick Snels <nick.snels@gmail.com>
: Reply-To: java-user@lucene.apache.org
: To: java-user@lucene.apache.org
: Subject: Restrict result returned by Morelikethis
:
: Hi,
:
: I have made a Morelikethis query to look up documents that match a certain
: document id. This results in a search of the whole index. I would like the
: Morelikethis query to search only part of the index. How can I do this?
:
: I have already tried to create a BooleanQuery, like:
:
: BooleanQuery comboQuery = new BooleanQuery();
: comboQuery.add(mltQuery, true, false);
: comboQuery.add(originalQuery, true, false);
:
: But I get the error: cannot find symbol
:                            [javac] symbol  : method add(
: org.apache.lucene.search.Query,boolean,boolean)
:
: What is the correct way to restrict the search area of a Morelikethis query?
: Any help is welcome. Thanks.
:
: Kind regards,
:
: Nick Snels
:



-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message