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

No possibility to access to the underlying "valueSource" of a FunctionScoreQuery

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.6
    • 8.0
    • None
    • New, Patch Available

    Description

      After LUCENE-8099, the "BoostedQuery" is deprecated by the use of the "FunctionScoreQuery". With the BoostedQuery, it was possible to access at its underlying "valueSource". But it is not the case with the class "FunctionScoreQuery". It has got only a getter for the wrapped query, 

      For development of specific parsers, it would be necessary to access the valueSource of a "FunctionScoreQuery". I suggest to add a new getter into the class "FunctionScoreQuery" like below:

       /**
         * @return the wrapped Query
         */
        public Query getWrappedQuery() {
          return in;
        }
      
       /**
         * @return the a source of scores
         */
        public DoubleValuesSource getValueSource() {
          return source;
        }
      

      Attachments

        1. LUCENE-8655.patch
          4 kB
          Gérald Quaire
        2. LUCENE-8655.patch
          4 kB
          Gérald Quaire

        Issue Links

          Activity

            People

              romseygeek Alan Woodward
              gquaire Gérald Quaire
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: