Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-496

New tool for reseting the (length)norm of fields after changing Similarity

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: core/index
    • Labels:
      None

      Description

      I've written a little tool that seems like it can/will be very handy as I tweak my custom similarity. I think it would make a good addition to contrib/miscellaneous.

      Class and Tests to be attached shortly...

      1. LengthNormModifier.java
        4 kB
        Hoss Man
      2. TestLengthNormModifier.java
        5 kB
        Hoss Man

        Activity

        Hide
        hossman Hoss Man added a comment -

        Class with utility function, and main that calls it on an FSDirectory. Also test cases for the utility function using a RAMDirectory

        Show
        hossman Hoss Man added a comment - Class with utility function, and main that calls it on an FSDirectory. Also test cases for the utility function using a RAMDirectory
        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Looks good! Should this be in the index package?

        You could even optionally reconstruct the boost if you wanted to (to the precision allowed by the 8 bit float at least) by using the original Similarity to calculate what the lengthNorm is alone, and comparing against the actual norm.

        Show
        yseeley@gmail.com Yonik Seeley added a comment - Looks good! Should this be in the index package? You could even optionally reconstruct the boost if you wanted to (to the precision allowed by the 8 bit float at least) by using the original Similarity to calculate what the lengthNorm is alone, and comparing against the actual norm.
        Hide
        hossman Hoss Man added a comment -

        FYI: I picked the package to match the other classes in contrib/miscellaneous ... I don't think it matters very much what package it lives in.

        As for reconstructing the boost: It's possible, but this met my needs and I've got some bigger things to worry about at the moment.

        Show
        hossman Hoss Man added a comment - FYI: I picked the package to match the other classes in contrib/miscellaneous ... I don't think it matters very much what package it lives in. As for reconstructing the boost: It's possible, but this met my needs and I've got some bigger things to worry about at the moment.
        Hide
        hossman Hoss Man added a comment -

        Commited with some small documentation additions.

        Show
        hossman Hoss Man added a comment - Commited with some small documentation additions.

          People

          • Assignee:
            hossman Hoss Man
            Reporter:
            hossman Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development