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

Using ConstantScoreQuery on a RemoteSearchable throws java.io.NotSerializableException

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9
    • 2.0.0
    • core/search
    • 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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment