lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Lucene Ranking Problem
Date Tue, 18 Jan 2011 12:28:48 GMT
See what Searcher.explain() says for each hit. I don't think that word
order will matter with the query you give.  There are several factors
in scoring - see oal.search.Similarity or google lucene scoring.

Or have a play with Luke: invaluable for investigating things with
lucene and will tell you everything about your index.


--
Ian.


On Tue, Jan 18, 2011 at 12:12 PM, Lahiru Samarakoon <lahiruts@gmail.com> wrote:
> Dear All,
>
>  I have two documents. The analyzed and the tokenized contents are mentioned
> below.
>
>  *Document 1 :*
>
>  *when*, null_1, *my*, null_1, money,
>
> fund, amount, payment, creditcard, credit,
>
> card, *bank, account*, debit, deduct,
>
> *charge*, null_1, my, mobile, usage,
>
> *service*, connection
>
>
>  *Document 2:*
>
>  *when*, what, time, what, day,
>
> null_1, money, fund, cash, payment,
>
> null_1, i, do, you, i,
>
> null_1, deduct, *charge*, reduce, debit,
>
> from, *my*, *bank, account*, credit,
>
> card, null_1, *adsl*, adsl1, adsl-2,
>
> adsl-1, adsl2, adsl, 1, adsl,
>
> 2, usage, connection, *service*
>
>
>  Then, I searched for the following text.
>
>  *Query:* when my bank account charge adsl service
>
>  *Scores
> *
>
> Document 1 = 0.74406385
>
> Document 2 = Score = 0.66067594
>
>  I was expecting to have Document 2 as the top ranked document. But I get
> Document 1 as the top ranked even it does not contains  the term “adsl”.
>
>  The word order of the Document 1 matches with the query very well. Can it
> be the reason ?
>
> If it is, how can I neglect the word order when searching. (I am not using
> phase queries).
>
> My searching code look like below and it is very simple.
>
>
>  *QueryParser parser = new QueryParser(Version.LUCENE_30, *
>
> *"pattern", *
>
> *new StandardAnalyzer(Version.LUCENE_30)); *
>
> *org.apache.lucene.search.Query query1 =
> parser.parse(this.query.getQuestion()); *
>
> *TopDocs hits = is.search(query1, 10); *
>
>  Please advice
>
>
> Thanks,
>
> Lahiru
>

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