It didn't really work for booleanqueries either. I thought it was working for some hours but to my big disappointment I realized that this was not the case.
Im using two IndexReaders ( RAM and FS ) and one multireader. Creating one indexsearcher by passing the multireader as constructor argument. Set the similarity class to my own similarity class using the SetSimilarity method on the searcher. This is the source for the similarity class I'm using: public class BoostOnlySimilarity : Similarity { /// <summary>Implemented as <code>1/sqrt(numTerms)</code>. </summary> public override float LengthNorm(System.String fieldName, int numTerms) { return 1; } /// <summary>Implemented as <code>1/sqrt(sumOfSquaredWeights)</code>. </summary> public override float QueryNorm(float sumOfSquaredWeights) { // Deal with the multiple terms issue return 1; //return (float)(1.0 / sumOfSquaredWeights); // return 1; } /// <summary>Implemented as <code>sqrt(freq)</code>. </summary> public override float Tf(float freq) { return 1; } /// <summary>Implemented as <code>1 / (distance + 1)</code>. </summary> public override float SloppyFreq(int distance) { return 1; } public override float Idf(Lucene.Net.Index.Term term, Searcher searcher) { return 1; } public override float Ldf(int docFreq, int numDocs) { return 1; } /// <summary>Implemented as <code>overlap / maxOverlap</code>. </summary> public override float Coord(int overlap, int maxOverlap) { return 1; } } / Marcus -----Ursprungligt meddelande----- Från: Chris Hostetter [mailto:[EMAIL PROTECTED] Skickat: den 12 september 2006 17:20 Till: java-user@lucene.apache.org Ämne: Re: SV: Changing the Scoring api : However the BooleanQuery's disableCoord seems to make effect. : But I still have the problem when I'm constructing queries with wildcards. really? ... that's strange, WildcardQuery uses the disableCoord feature of BooleanQuery. Do you have an example of what you mean? : already had implemented my own similarity class that has the coord fixed : to 1. And it doesn't work as excepted. are you setting your Similarity as the default on your IndexSearcher prior to executing your Queries? -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]