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

Using ConstantScoreQuery on a RemoteSearchable throws java.io.NotSerializableException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 2.0.0
    • Component/s: core/search
    • Labels:
      None

      Description

      Using a ConstantScoreQuery through a MultiSearcher on a Searchable obtained through RMI (RemoteSearchable) will throw a java.io.NotSerializableException

      The problem seems to be the fact that the ConstantScoreQuery.ConstantWeight has a Searcher member variable which is not serializable. Keeping a reference to the Searcher does not seem to be required: the fix seems trivial.

      I've created the TestCase to reproduce the issue and the patch to fix it.

      1. constantscorequery.patch
        1.0 kB
        Philippe Laflamme
      2. constantscorequery-testcase.patch
        0.8 kB
        Philippe Laflamme

        Activity

        Hide
        plaflamme Philippe Laflamme added a comment -

        Patch files.

        Show
        plaflamme Philippe Laflamme added a comment - Patch files.
        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Thanks Philippe! I just commited this.

        Show
        yseeley@gmail.com Yonik Seeley added a comment - Thanks Philippe! I just commited this.

          People

          • Assignee:
            yseeley@gmail.com Yonik Seeley
            Reporter:
            plaflamme Philippe Laflamme
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development