You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Daniel Iversen <da...@gmail.com> on 2005/10/13 05:42:28 UTC

Fwd: Boolean search in Nutch

Team,
 Quick question - how do one enable boolean searching ("car" and "Ferarri")
in Nutch (especially the sample index.jsp and search.jsp)..
 I couldn't find anything on the Nutch website, Google or the API (besides
learning that there is a Query.Clause object which I can't seem how to use)
 Any pointers would be greatly appreciated.
 Cheers,
Daniel

Re: Boolean search in Nutch

Posted by Daniel Iversen <da...@gmail.com>.
o.k. Thanks a lot Giang for your answer, however what I really want to
achieve is the AND and OR operators in the same query, for example a search
clause like this;
 "(red OR blue) AND (short OR long)"
 or
 "(java OR j2ee) AND (database OR db)"
 My last example wasn't thorough enough, sorry for that.
 Any ideas on how to do that.... I am happy to pass any examples along as I
write them for others to benefit from them as well.
 Pointers appreciated.
 Cheers,
Daniel

 On 10/13/05, Ngoc Giang Nguyen <gi...@gmail.com> wrote:
>
> When you search for "car" "Ferarri", by default, a BooleanQuery object
> will
> be created, in which "car" is an isRequired clause and "Ferrari" is also
> an
> isRequired clause. This BooleanQuery will be passed to Lucene engine to
> search. You can look at org.apache.nutch.searcher package for more details
> about this issue.
>
> Cheers,
> Giang
>
>
> On 10/13/05, Daniel Iversen <da...@gmail.com> wrote:
> >
> > Team,
> > Quick question - how do one enable boolean searching ("car" and
> "Ferarri")
> > in Nutch (especially the sample index.jsp and search.jsp)..
> > I couldn't find anything on the Nutch website, Google or the API
> (besides
> > learning that there is a Query.Clause object which I can't seem how to
> > use)
> > Any pointers would be greatly appreciated.
> > Cheers,
> > Daniel
> >
> >
>
>

Re: Boolean search in Nutch

Posted by Ngoc Giang Nguyen <gi...@gmail.com>.
When you search for "car" "Ferarri", by default, a BooleanQuery object will
be created, in which "car" is an isRequired clause and "Ferrari" is also an
isRequired clause. This BooleanQuery will be passed to Lucene engine to
search. You can look at org.apache.nutch.searcher package for more details
about this issue.

Cheers,
Giang


On 10/13/05, Daniel Iversen <da...@gmail.com> wrote:
>
> Team,
> Quick question - how do one enable boolean searching ("car" and "Ferarri")
> in Nutch (especially the sample index.jsp and search.jsp)..
> I couldn't find anything on the Nutch website, Google or the API (besides
> learning that there is a Query.Clause object which I can't seem how to
> use)
> Any pointers would be greatly appreciated.
> Cheers,
> Daniel
>
>