Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Remove the rest of the deprecated query components.

      1. LUCENE-1973-BoostingTermQuery.patch
        4 kB
        Uwe Schindler
      2. LUCENE-1973-MultiValueSource.patch
        10 kB
        Uwe Schindler
      3. LUCENE-1973-MultiValueSource.patch
        8 kB
        Uwe Schindler
      4. LUCENE-1973-MultiValueSource-BW.patch
        3 kB
        Uwe Schindler
      5. LUCENE-1973-Similarity.patch
        17 kB
        Uwe Schindler
      6. LUCENE-1973-Similarity-BW.patch
        6 kB
        Uwe Schindler

        Issue Links

          Activity

          Hide
          Uwe Schindler added a comment - - edited

          There are still some of them:

          • explain() in Scorer (I do not know what to do exactly here, I use explain() very seldom) -> (DONE, see LUCENE-2011)
          • idf() in Similarity (DONE)
          • IndexSearcher.fieldSortDoTrackScores / IS.fieldSortDoMaxScore (DONE by un-deprecation, thanks Mike!)
          • BoostingTermQuery (DONE)
          • MultiValueSource (DONE)
          • BooleanQuery scoreDocOutOfOrder & others (LUCENE-944) (DONE)

          Fixed all.

          Show
          Uwe Schindler added a comment - - edited There are still some of them: explain() in Scorer (I do not know what to do exactly here, I use explain() very seldom) -> (DONE, see LUCENE-2011 ) idf() in Similarity (DONE) IndexSearcher.fieldSortDoTrackScores / IS.fieldSortDoMaxScore (DONE by un-deprecation, thanks Mike!) BoostingTermQuery (DONE) MultiValueSource (DONE) BooleanQuery scoreDocOutOfOrder & others ( LUCENE-944 ) (DONE) Fixed all.
          Hide
          Uwe Schindler added a comment -

          Anybody wants to help?

          Show
          Uwe Schindler added a comment - Anybody wants to help?
          Hide
          Uwe Schindler added a comment -

          Here patch on removal of Similarity deprecations. One more occurence of my famous MethodSupport dies

          Do not wonder about the assertTrue() -> assertEquals() changes in TestSimilarity, but I had a problem at the beginning to find out why the score() was not 1.0 for the PhraseQuery (I just removed the collection idf() method from the SimpleSimilarity, but had to reimplement is using Eplanations()). And this both in BW branch and trunk.

          Will commit soon when all tests have been run.

          Show
          Uwe Schindler added a comment - Here patch on removal of Similarity deprecations. One more occurence of my famous MethodSupport dies Do not wonder about the assertTrue() -> assertEquals() changes in TestSimilarity, but I had a problem at the beginning to find out why the score() was not 1.0 for the PhraseQuery (I just removed the collection idf() method from the SimpleSimilarity, but had to reimplement is using Eplanations()). And this both in BW branch and trunk. Will commit soon when all tests have been run.
          Hide
          Uwe Schindler added a comment -

          Updated patch, I forgot the test for PayloadNearQuery, which also had a custom Similarity.

          Show
          Uwe Schindler added a comment - Updated patch, I forgot the test for PayloadNearQuery, which also had a custom Similarity.
          Hide
          Uwe Schindler added a comment -

          Committed similarity changes in revision: 829002

          Show
          Uwe Schindler added a comment - Committed similarity changes in revision: 829002
          Hide
          Uwe Schindler added a comment -

          Here my committed patch, I only added one more SimpleSimilarity implementation in TestOmitTf

          Show
          Uwe Schindler added a comment - Here my committed patch, I only added one more SimpleSimilarity implementation in TestOmitTf
          Hide
          Uwe Schindler added a comment -

          remove BoostingTermQuery.

          The xml-query-parser now creates a PayloadTermQuery with the default payload function.

          Show
          Uwe Schindler added a comment - remove BoostingTermQuery. The xml-query-parser now creates a PayloadTermQuery with the default payload function.
          Hide
          Uwe Schindler added a comment -

          Committed removal of BoostingTermQuery in revision: 829020

          Show
          Uwe Schindler added a comment - Committed removal of BoostingTermQuery in revision: 829020
          Hide
          Uwe Schindler added a comment -

          I looked into the following:

          IndexSearcher.fieldSortDoTrackScores / IndexSearcher.fieldSortDoMaxScore and into the following deprecated method:

          IndexSearcher.setDefaultFieldSortScoring(boolean doTrackScores, boolean doMaxScore) // (non-static)
          

          In my opinion, this is a good setting in IndexSearcher to enable the scores tracking for sorted queries, too. Without this setting, one have to craete the TopFieldDocCollector manually, what we not really want the user to do (because the static ctor params are source of confusion). If I had known the method before, I would use it in my IndexSearcher and set it to true, if needed. It is a per instance setting, so it is no static hell affected (like anywhere else).

          Should we simply document it correct and un-deprecate in 2.9? It makes life easier.

          +1 from my side.

          Show
          Uwe Schindler added a comment - I looked into the following: IndexSearcher.fieldSortDoTrackScores / IndexSearcher.fieldSortDoMaxScore and into the following deprecated method: IndexSearcher.setDefaultFieldSortScoring( boolean doTrackScores, boolean doMaxScore) // (non- static ) In my opinion, this is a good setting in IndexSearcher to enable the scores tracking for sorted queries, too. Without this setting, one have to craete the TopFieldDocCollector manually, what we not really want the user to do (because the static ctor params are source of confusion). If I had known the method before, I would use it in my IndexSearcher and set it to true, if needed. It is a per instance setting, so it is no static hell affected (like anywhere else). Should we simply document it correct and un-deprecate in 2.9? It makes life easier. +1 from my side.
          Hide
          Michael McCandless added a comment -

          Should we simply document it correct and un-deprecate in 2.9? It makes life easier.

          +1, I think this makes sense.

          Show
          Michael McCandless added a comment - Should we simply document it correct and un-deprecate in 2.9? It makes life easier. +1, I think this makes sense.
          Hide
          Uwe Schindler added a comment -

          Can you do it? You are the RM.

          A short documentation and CHANGES entry should be added. Something like: "If you want to have scores or maxScore for sorted results, you should use setDefaultFieldSortScoring(). Otherwise you have to create TopFieldCollector yourself, which is not recommended."

          We can then remove the item from the TODO for this issue (and also un-deprecate it in trunk).

          Show
          Uwe Schindler added a comment - Can you do it? You are the RM. A short documentation and CHANGES entry should be added. Something like: "If you want to have scores or maxScore for sorted results, you should use setDefaultFieldSortScoring(). Otherwise you have to create TopFieldCollector yourself, which is not recommended." We can then remove the item from the TODO for this issue (and also un-deprecate it in trunk).
          Hide
          Michael McCandless added a comment -

          OK will do.

          Show
          Michael McCandless added a comment - OK will do.
          Hide
          Uwe Schindler added a comment - - edited

          Now it gets simplier. These are the remaining deprecations in core, as far as I know.

          I would keep MultiValueSource but the explain thing is more work, but hat this time nothing to do with 2.9.1

          edit

          I verified, these are really the remaining deprecations-to-remove in core. You will find more of them, but they are needed for index compatibility and must stay until 3.9 or are simply markers for other things to remove some time (non-public methods or fields).

          So we are close to 3.0 release

          Show
          Uwe Schindler added a comment - - edited Now it gets simplier. These are the remaining deprecations in core, as far as I know. I would keep MultiValueSource but the explain thing is more work, but hat this time nothing to do with 2.9.1 edit I verified, these are really the remaining deprecations-to-remove in core. You will find more of them, but they are needed for index compatibility and must stay until 3.9 or are simply markers for other things to remove some time (non-public methods or fields). So we are close to 3.0 release
          Hide
          Uwe Schindler added a comment -

          Now only MultiValueSource remains. Remove? Or keep for users not able to do per-segment searches?

          Show
          Uwe Schindler added a comment - Now only MultiValueSource remains. Remove? Or keep for users not able to do per-segment searches?
          Hide
          Uwe Schindler added a comment -

          The last deprecation in search package. If somebody thinks, we still need MultiValueSource (even TestOrdValues pass without them), please tell me. I do not exactly know the reason for this newly-deprecated class in 2.9. Hoss? Mark? Who did the FieldCacheSanity checker?

          I will commit this tomorrow morning GMT.

          Show
          Uwe Schindler added a comment - The last deprecation in search package. If somebody thinks, we still need MultiValueSource (even TestOrdValues pass without them), please tell me. I do not exactly know the reason for this newly-deprecated class in 2.9. Hoss? Mark? Who did the FieldCacheSanity checker? I will commit this tomorrow morning GMT.
          Hide
          Uwe Schindler added a comment -

          Fix also JavaDocs.

          Show
          Uwe Schindler added a comment - Fix also JavaDocs.
          Hide
          Uwe Schindler added a comment - - edited

          Committed MultiValueSource removal in revision: 834812

          Now we are finished with deprec removal in core. I'll check again... - Found one more

          Show
          Uwe Schindler added a comment - - edited Committed MultiValueSource removal in revision: 834812 Now we are finished with deprec removal in core. I'll check again... - Found one more

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Uwe Schindler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development