Details

    • Lucene Fields:
      New

      Description

      The EasySimilarityProvider in TestEasySimilarity would be a good candidate for a full-fledged class. Both DefaultSimilarity and BM25Similarity have their own providers, which are effectively the same,so I don't see why we couldn't add one generic provider for convenience.

      1. LUCENE-3391.patch
        4 kB
        David Mark Nemeskey
      2. LUCENE-3391.patch
        5 kB
        David Mark Nemeskey
      3. LUCENE-3391.patch
        8 kB
        David Mark Nemeskey
      4. LUCENE-3391.patch
        8 kB
        David Mark Nemeskey

        Activity

        Hide
        Robert Muir added a comment -

        Thanks David!

        Show
        Robert Muir added a comment - Thanks David!
        Hide
        David Mark Nemeskey added a comment -

        Fixed the issues you mentioned.

        Show
        David Mark Nemeskey added a comment - Fixed the issues you mentioned.
        Hide
        David Mark Nemeskey added a comment -

        (1) I was also hesitant to add the generics, because I wasn't sure about the warnings it gave. So I'll remove that happily.
        (2) And I guess the method parameter in queryNorm?
        (3) I'm pretty bad at naming things, so I'd take your advice in this. Is BasicSimilarityProvider OK?

        Show
        David Mark Nemeskey added a comment - (1) I was also hesitant to add the generics, because I wasn't sure about the warnings it gave. So I'll remove that happily. (2) And I guess the method parameter in queryNorm? (3) I'm pretty bad at naming things, so I'd take your advice in this. Is BasicSimilarityProvider OK?
        Hide
        Robert Muir added a comment -

        a few comments:

        • I think we should avoid the generics here? also I think the private sim should be final.
        • If the idea is to use for non-vector space sims, I think we should return 1 for coord() by default? in my tests it sometimes totally hoses the ranking for e.g. probabilistic models.
        • We can also rethink the naming in that regard? its just a Similarity provider that always returns the same similarity?
        Show
        Robert Muir added a comment - a few comments: I think we should avoid the generics here? also I think the private sim should be final. If the idea is to use for non-vector space sims, I think we should return 1 for coord() by default? in my tests it sometimes totally hoses the ranking for e.g. probabilistic models. We can also rethink the naming in that regard? its just a Similarity provider that always returns the same similarity?
        Hide
        David Mark Nemeskey added a comment -

        Got rid of BM25SimilarityProvider.

        Show
        David Mark Nemeskey added a comment - Got rid of BM25SimilarityProvider.
        Hide
        David Mark Nemeskey added a comment -

        Hinted at EasySimilarityProvider in the package javadoc.

        Show
        David Mark Nemeskey added a comment - Hinted at EasySimilarityProvider in the package javadoc.
        Hide
        David Mark Nemeskey added a comment -

        EasySimilarityProvider added.

        Show
        David Mark Nemeskey added a comment - EasySimilarityProvider added.

          People

          • Assignee:
            David Mark Nemeskey
            Reporter:
            David Mark Nemeskey
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development