[ https://issues.apache.org/jira/browse/LUCENE-2236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-2236: -------------------------------- Attachment: LUCENE-2236.patch attached is a patch to enable per-field similarity. it includes the prerequisite patch to LUCENE-2869, which i separately plan to commit soon (then update my local). the patch creates two new classes: * SimilarityProvider: contains the field-independent methods like coord(). also has a get(String field) that returns a FieldSimilarity * FieldSimilarity: all the field-specific stuff like tf, etc. the old Similarity is deprecated, it is a FieldSimilarity and also a SimilarityProvider, that always returns itself. Maybe it could be removed since i tried to cutover all code, I didnt check. Removing it would allow us to remove the redundant field arguments from the FieldSimilarity methods easily. Additionally Scorer's "Similarity" is removed. This is useless and most scorers ignored it or populated it with garbage. Scorers themselves, know if they need a sim or not (e.g. BooleanScorer uses only the top-level SimilarityProvider for coord). all lucene/contrib/solr tests pass, i also added a simple unit test. > Similarity can only be set per index, but I may want to adjust scoring > behaviour at a field level > ------------------------------------------------------------------------------------------------- > > Key: LUCENE-2236 > URL: https://issues.apache.org/jira/browse/LUCENE-2236 > Project: Lucene - Java > Issue Type: Improvement > Components: Query/Scoring > Affects Versions: 3.0 > Reporter: Paul taylor > Assignee: Robert Muir > Attachments: LUCENE-2236.patch > > > Similarity can only be set per index, but I may want to adjust scoring > behaviour at a field level, to faciliate this could we pass make field name > available to all score methods. > Currently it is only passed to some such as lengthNorm() but not others such > as tf() -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org