This might help you understand Lucene scoring better...

 http://lucene.apache.org/java/2_4_1/scoring.html

The number of occurrences is not the sole determinant of a
document's score and boosting won't change that.

But I have to ask why counting words is important to you. What problem
are you trying to solve that requires that a document with a word
occurring, say, 5 times in 10,000 tokens should rank higher than a
document where that word occurs twice in 10 tokens?

Best
Erick

On Thu, Mar 19, 2009 at 8:54 AM, m.harig <m.ha...@gmail.com> wrote:

>
> Hello all,
>
>               i've a search application which uses lucene-2.3.0 , and my
> application running for a banking domain.  Am indexing some banking urls as
> an input and am searching some keywords.   What my doubt is when i search
> "cards", the less count keyword url comes up. I mean , for example
>
>                                                    http://www.siteA.com
>                                                    http://www.siteB.com
>                                                    http://www.siteC.com
>
>                        in that urls , http://www.siteB.com has got more
> number of words count "cards" than the other two sites. But when am
> searching am getting the http://www.siteB.com as the last search result,
> other two urls are coming up.
>
>                      But i need the url which has more number word counts
> will come up .  I used filed.setBoost(100f); Is it the right way to boost
> the field? How do i do my above. ? please anyone help me out of this.......
> --
> View this message in context:
> http://www.nabble.com/boosting-query-tp22599538p22599538.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

Reply via email to