Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2583

Make external scoring more efficient (ExternalFileField, FileFloatSource)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • search
    • None

    Description

      External scoring eats much memory, depending on the number of documents in the index. The ExternalFileField (used for external scoring) uses FileFloatSource, where one FileFloatSource is created per external scoring file. FileFloatSource creates a float array with the size of the number of docs (this is also done if the file to load is not found). If there are much less entries in the scoring file than there are number of docs in total the big float array wastes much memory.

      This could be optimized by using a map of doc -> score, so that the map contains as many entries as there are scoring entries in the external file, but not more.

      Attachments

        1. FileFloatSource.java.patch
          5 kB
          Martin Grotzke
        2. patch.txt
          12 kB
          Robert Muir

        Issue Links

          Activity

            People

              Unassigned Unassigned
              martin.grotzke Martin Grotzke
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: