Ahum, one option would of course not work: copyFielding them to field with positions but the phrase query is executed on fields specified in qf (not pf). And since i need tf=1 in qf, it wouldn't work.
I guess extending DefaultSimilarity is the best option, this way i still have position information in the qf fields (for generated phrase queries) but without scores affected by tf-spam. This is, however, not ideal because it still executes expensive phrase queries with slop, increasing query time for some queries. Has anyone been able to patch SOLR-2105 to Solr 1.4.1? https://issues.apache.org/jira/browse/SOLR-2015 On Monday 14 March 2011 16:47:24 Markus Jelsma wrote: > Hi, > > In Solr 1.4.1 we don't have feature to disable automatic generation of > phrase queries. The phrase queries are generated thanks of the word > delimiter filter i use. The problem is, i cannot use the QS parameter in > DisMax to allow slop for these generated phrase queries because i require > a steady TF throughout for all documents (simple anti-spam measure). But, > omitting TF also omits positions which, of course, silently fails to find > the documents. > > I can copyField the the title and body fields for use in phrase queries but > that would increase the index just too much. I could also don't use the > omitTfAndPositions parameter and extend DefaultSimilarity to always return > tf=f1.0. I can also use the PositionFilter but that yields too many results > despite mm=100%. I don't use phrase queries so that's not the problem. I > could also upgrade to 3.1 but that's not possible yet. > > Any advice? > > Cheers, -- Markus Jelsma - CTO - Openindex http://www.linkedin.com/in/markus17 050-8536620 / 06-50258350