Your best bet is to look into the explanations of each of these documents in the context of your query via the explain() method on the Searcher (IndexSearcher). If I had to venture a guess, the docs w/ only one term have a higher TF/IDF value (I would even venture to guess that they contain the word "transference" and not "bank"). It is also entirely possible that those docs are shorter or have a boost value. The explain method should tell you why.

For a broader view of how to debug ranking issues, you might find http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Debugging-Relevance-Issues-Search to be helpful.

HTH,
Grant

On Apr 9, 2009, at 9:13 AM, Ariel wrote:

Hi everybody:

I have a question about the ranking of lucene. Here I have the problem: when I do a search in my index like this: bank OR transference I get 10 results, the first two documents that are returned have the both terms in the content field but then the 3th, 4th and 5th only has the word bank and then the 6th
is a document that have both terms.
Why is this happening ?
It is not supposed that when I do a search with the OR operator it returned first the documents that have the terms together and then the document that
only have one of the two terms ???
I am indexing by two fields and I am searching with MultifieldQuery in both fields two: title and content, I am using the same analyzer for indexing and
searching.

I hope you can help me.
Thanks in advance
Regards
Ariel

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene:
http://www.lucidimagination.com/search


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