Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Spinoff of LUCENE-2854.

      See LUCENE-2828 and LUCENE-2854 for reference.

      In general, the SimilarityDelegator was problematic with regards to back-compat, and if queries
      want to score differently, trying to runtime subclass Similarity only causes trouble.

      The reason we could not fix this in LUCENE-2854 is because:

      Michael McCandless added a comment - 08/Jan/11 01:53 PM
      bq. Is it possible to remove this method Query.getSimilarity also? I don't understand why we need this method!
      
      I would love to! But I think that's for another day...
      
      I looked into this and got stuck with BoostingQuery, which rewrites to an anon 
      subclass of BQ overriding its getSimilarity in turn override its coord method. 
      Rather twisted... if we can do this differently I think we could remove Query.getSimilarity.
      

      here is the method in question:

      /** Expert: Returns the Similarity implementation to be used for this query.
       * Subclasses may override this method to specify their own Similarity
       * implementation, perhaps one that delegates through that of the Searcher.
       * By default the Searcher's Similarity implementation is returned.*/
      public Similarity getSimilarity(IndexSearcher searcher) {
        return searcher.getSimilarity();
      }
      

        Activity

        Robert Muir created issue -
        Robert Muir made changes -
        Field Original Value New Value
        Attachment LUCENE-2869.patch [ 12468379 ]
        Robert Muir made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Robert Muir [ rcmuir ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12542504 ] Default workflow, editable Closed status [ 12564192 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12564192 ] jira [ 12583977 ]

          People

          • Assignee:
            Robert Muir
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development