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

Using ConstantScoreQuery on a RemoteSearchable throws java.io.NotSerializableException

    XMLWordPrintableJSON

    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.

        Attachments

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

          Activity

            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: