lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: Low hits
Date Tue, 23 Jan 2007 13:01:07 GMT
What version of Lucene are you using? 2.0 doesn't have a doc.add like that.
You'd do something like
doc.add(new Field("title", title, Field.Store.YES, Field.Index.TOKENIZED);

So I really don't understand what you're trying to do. Nor do I understand
what "2%" means in this context....

But there are two things you should be aware of.
1> the analyzer you use when you create your index AND when you query your
index should be the same, at least when you start. There are reasons why you
might want to use different ones, but certainly not when you are starting.
Otherwise you, say, index something and it's automatically folded into
lowercase (StandardAnalyzer certainly does this) but your query could be
uppercase if you use, say SimpleAnalyzer for the query phase.

2> get Luke (google lucene luke). It allows you to examine your index and
see what's actually in it. Otherwise you're flying blind. It also allows you
to enter queries manually (see Lucene In Action for lucene's query syntax).
Really, really get Luke. It'll make your life much easier.

You probably want to post bigger snippets of actual code for folks to look
at, since one line of code and "it doesn't work" don't give us much to go on


On 1/23/07, DECAFFMEYER MATHIEU <> wrote:
> Hi,
> I'm pretty new to Lucene and I try to find some help here.
> I added  the title of the document :
> doc.add(Field.Text("title", title));
> e.g. the title is "Constructions"
> When I do a search on this title I have as result 2%
> Can someone help me udnerstanding what I am doing wrong ?
> Thank u.
> *__________________________________*
> *   Mathieu Decaffmeyer*
> ============================================
> Internet communications are not secure and therefore Fortis Banque
> Luxembourg S.A. does not accept legal responsibility for the contents of
> this message. The information contained in this e-mail is confidential and
> may be legally privileged. It is intended solely for the addressee. If you
> are not the intended recipient, any disclosure, copying, distribution or any
> action taken or omitted to be taken in reliance on it, is prohibited and may
> be unlawful. Nothing in the message is capable or intended to create any
> legally binding obligations on either party and it is not intended to
> provide legal advice.
> ============================================
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message