lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pleasant, Tracy" <tracy.pleas...@lmco.com>
Subject RE: Score
Date Tue, 25 Nov 2003 15:55:28 GMT
Thanks for your input. 
I am using the standard analyzer for everything. I haven't created my
own analyzer yet.

The documents I am using: 

Plain text
PDF Documents

(I have two indexes) 

When I create my index: 
       IndexWriter writer = new IndexWriter(index_name, new
StandardAnalyzer(),true);

When I search:
    Analyzer analyzer = new StandardAnalyzer();
    query = MultiFieldQueryParser.parse(queryString, fields, analyzer); 
    (where query String is the term to search and fields is the array of
fields)

When searching it does the one index then it does the other. 


When you say you use different analyzers for different fields in your
index, how would you accomplish that? When I create the index it has a
parameter for analyzer.. unless you create different indexes , how do
you use two different ones? 



-----Original Message-----
From: Gerret Apelt [mailto:ga11@cs.waikato.ac.nz]
Sent: Monday, November 24, 2003 3:25 PM
To: Lucene Users List
Subject: Re: Score


Tracey --

it would help if you could give more detail on the types of documents, 
fields and analyzers you're using. Also what do you mean by "Multi Field

Search"? I presume you're using the MultiFieldQueryParser to have query 
terms in a user-submitted query be searched for in each field in your
index.

If I am understanding your problem, then it might be the same one I had 
a few weeks ago -- highly relevant matches would not receive a high 
ranking. (This paragraph will apply to you only if you use more than 
just one Analyzer for the set of your fields). I had six fields in my 
index, most of which were populated with a standard analyzer. I used 
self-made Analyzers for two of the fields. This turned out to be my 
problem when using MultiFieldQueryParser: I told my 
MultiFieldQueryParser instance to use only the standard analyzer. 
Instead I discovered that I needed to make use of 
org.apache.lucene.analysis.PerFieldAnalyzerWrapper and feed that to the 
MultiFieldQueryParser. Unless you do this, your problem is whats 
described here: 
http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi?file=chapter.in
dexing&toc=faq#q15.

Most likely, if your scoring is off, you're "doing something wrong" in 
the way you use the Lucene API -- at least, thats what I've discovered 
to be the case when my ranking is off.

If you're interested in the nitty-gritty of how scoring is done, check 
this FAQ entry:
http://lucene.sourceforge.net/cgi-bin/faq/faqmanager.cgi?file=chapter.se
arch&toc=faq#q31

cheers,
Gerret

Pleasant, Tracy wrote:

>Hi,
>
>I'm using the Multi Field Search to search all the fields of my
>documents during the search. 
>
>When it returns results the scores are numerically low - .06, .17, etc.
>I would think if I searched for "Dog" and there was a doc with "Dog" in
>the title and several times in the contents of a document that it would
>receive a score more like 1.0 or close to it.
>
>Is there a way that I can tweak the score?
>
>I tried using Boost but that did absolutely nothing.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message