Lucene - Core
  1. Lucene - Core
  2. LUCENE-1808

make Query.createWeight public (or add back Query.createQueryWeight())

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9
    • Component/s: core/query/scoring
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Now that the QueryWeight class has been removed, the public QueryWeight createQueryWeight() method on Query was also removed

      i have cases where i want to create a weight for a sub query (outside of the org.apache.lucene.search package) and i don't want the weight normalized (think BooleanQuery outside of the o.a.l.search package)

      in order to do this, i have to create a static Utils class inside o.a.l.search, pass in the Query and searcher, and have the static method call the protected createWeight method
      this should not be necessary

      This could be fixed in one of 2 ways:
      1. make createWeight() public on Query (breaks back compat)
      2. add the following method:

      public Weight createQueryWeight(Searcher searcher) throws IOException {
        return createWeight(searcher);
      }
      

      createWeight(Searcher) should then be deprectated in favor of the publicly accessible method

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12563884 ] jira [ 12585390 ]
        Mark Thomas made changes -
        Workflow jira [ 12473232 ] Default workflow, editable Closed status [ 12563884 ]
        Mark Miller made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Miller made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Lucene Fields [New] [New, Patch Available]
        Resolution Fixed [ 1 ]
        Mark Miller made changes -
        Attachment LUCENE-1808.patch [ 12416730 ]
        Mark Miller made changes -
        Fix Version/s 2.9 [ 12312682 ]
        Affects Version/s 2.9 [ 12312682 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Mark Miller made changes -
        Field Original Value New Value
        Assignee Mark Miller [ markrmiller@gmail.com ]
        Tim Smith created issue -

          People

          • Assignee:
            Mark Miller
            Reporter:
            Tim Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development