Solr
  1. Solr
  2. SOLR-6128

SolrResourceLoader Error messages: deprecated fieldTypes in schema.xml

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.8.1
    • Fix Version/s: 4.9, 4.10, 6.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows Server 2012 R2

      Description

      for new users, these warnings are logged on startup using the example configs because they contain deprecated fieldTypes...

      Solr loaded a deprecated plugin/analysis class [solr.IntField]. Please consult documentation how to replace it accordingly.
      Solr loaded a deprecated plugin/analysis class [solr.LongField]. Please consult documentation how to replace it accordingly.
      Solr loaded a deprecated plugin/analysis class [solr.FloatField]. Please consult documentation how to replace it accordingly.
      Solr loaded a deprecated plugin/analysis class [solr.DoubleField]. Please consult documentation how to replace it accordingly.
      Solr loaded a deprecated plugin/analysis class [solr.DateField]. Please consult documentation how to replace it accordingly.
      

      These messages are also logged as warnings, but they have been spun off into SOLR-6179 since the have an unrelated fix:

      No stored data found for /rest/managed
      No registered observers for /rest/managed
      

        Issue Links

          Activity

          Hide
          Ahmet Arslan added a comment -

          Hi Omer,

          These are log messages printed at warning level. What is the problem you are facing here?

          Show
          Ahmet Arslan added a comment - Hi Omer, These are log messages printed at warning level. What is the problem you are facing here?
          Hide
          Omer Arslan added a comment -

          Hi Ahmet,

          Thanks for your reply,

          is it normal to face these Warning Messages? How do I clear them?

          Show
          Omer Arslan added a comment - Hi Ahmet, Thanks for your reply, is it normal to face these Warning Messages? How do I clear them?
          Hide
          Uwe Schindler added a comment -

          Do what the warning messages say: Fix your schema.xml to no longer use deprecated field types and analyzers. But be aware that you have to reindex.

          Show
          Uwe Schindler added a comment - Do what the warning messages say: Fix your schema.xml to no longer use deprecated field types and analyzers. But be aware that you have to reindex.
          Hide
          Ahmet Arslan added a comment -

          Fix your schema.xml to no longer use deprecated field types and analyzers.

          More precisely, remove these lines from your schema.xml

           NOTE: These field types are deprecated will be removed in Solr 5.0!
               <fieldType name="pint" class="solr.IntField"/>
              <fieldType name="plong" class="solr.LongField"/>
              <fieldType name="pfloat" class="solr.FloatField"/>
              <fieldType name="pdouble" class="solr.DoubleField"/>
              <fieldType name="pdate" class="solr.DateField" sortMissingLast="true"/>
          
              <fieldType name="text_th" class="solr.TextField" positionIncrementGap="100">
                <analyzer> 
                  <tokenizer class="solr.StandardTokenizerFactory"/>
                  <filter class="solr.LowerCaseFilterFactory"/>
                  <filter class="solr.ThaiWordFilterFactory"/>
                  <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_th.txt" />
                </analyzer>
              </fieldType>
          

          It is a good idea to remove unused types from schema.xml, it will be more clean and readable in that way. By the way you don't have to worry about these warning messages. Please rise your further questions on mailing lists. If you haven't subscribed already, here is how to do it : https://lucene.apache.org/solr/discussion.html

          Show
          Ahmet Arslan added a comment - Fix your schema.xml to no longer use deprecated field types and analyzers. More precisely, remove these lines from your schema.xml NOTE: These field types are deprecated will be removed in Solr 5.0! <fieldType name= "pint" class= "solr.IntField" /> <fieldType name= "plong" class= "solr.LongField" /> <fieldType name= "pfloat" class= "solr.FloatField" /> <fieldType name= "pdouble" class= "solr.DoubleField" /> <fieldType name= "pdate" class= "solr.DateField" sortMissingLast= "true" /> <fieldType name= "text_th" class= "solr.TextField" positionIncrementGap= "100" > <analyzer> <tokenizer class= "solr.StandardTokenizerFactory" /> <filter class= "solr.LowerCaseFilterFactory" /> <filter class= "solr.ThaiWordFilterFactory" /> <filter class= "solr.StopFilterFactory" ignoreCase= "true" words= "lang/stopwords_th.txt" /> </analyzer> </fieldType> It is a good idea to remove unused types from schema.xml, it will be more clean and readable in that way. By the way you don't have to worry about these warning messages. Please rise your further questions on mailing lists. If you haven't subscribed already, here is how to do it : https://lucene.apache.org/solr/discussion.html
          Hide
          Ahmet Arslan added a comment -

          Hi Omer Arslan, Since these are informative harmless warning messages, I am closing this one for now. We can re-open if required.

          Show
          Ahmet Arslan added a comment - Hi Omer Arslan , Since these are informative harmless warning messages, I am closing this one for now. We can re-open if required.
          Hide
          Marius Dumitru Florea added a comment -

          these are informative harmless warning messages

          If you are referring to:

          2014-06-11 15:37:28,566 [coreLoadExecutor-4-thread-1] WARN  o.a.s.r.ManagedResource        - No stored data found for /rest/managed
          2014-06-11 15:37:28,566 [coreLoadExecutor-4-thread-1] WARN  o.a.s.r.ManagedResource        - No registered observers for /rest/managed
          

          then why are they logged in the first place? If there's no problem then the log level should be INFO or even better DEBUG, but not WARN. Warning means there may be a problem. So you should either reopen this issue and fix the log level or tell us how can we avoid the WARN messages. These kind of "informative harmless" messages as you call them can make your life miserable when you have a problem and you need to filter the log for the real cause.

          Note that the above messages are still logged after I removed the 'managed_en' field type from schema.xml (and re-indexed of course).

          Show
          Marius Dumitru Florea added a comment - these are informative harmless warning messages If you are referring to: 2014-06-11 15:37:28,566 [coreLoadExecutor-4-thread-1] WARN o.a.s.r.ManagedResource - No stored data found for /rest/managed 2014-06-11 15:37:28,566 [coreLoadExecutor-4-thread-1] WARN o.a.s.r.ManagedResource - No registered observers for /rest/managed then why are they logged in the first place? If there's no problem then the log level should be INFO or even better DEBUG, but not WARN. Warning means there may be a problem. So you should either reopen this issue and fix the log level or tell us how can we avoid the WARN messages. These kind of "informative harmless" messages as you call them can make your life miserable when you have a problem and you need to filter the log for the real cause. Note that the above messages are still logged after I removed the 'managed_en' field type from schema.xml (and re-indexed of course).
          Hide
          Ahmet Arslan added a comment -

          Hi Marius Dumitru Florea, I was referring to 'deprecated plugin/analysis'.

          Note that the above messages are still logged after I removed the 'managed_en' field type from schema.xml

          I confirmed this behavior. I am not sure managed resources. Please rise this on user and/or dev list. Lets see what Timothy Potter and others will say.

          Show
          Ahmet Arslan added a comment - Hi Marius Dumitru Florea , I was referring to 'deprecated plugin/analysis'. Note that the above messages are still logged after I removed the 'managed_en' field type from schema.xml I confirmed this behavior. I am not sure managed resources. Please rise this on user and/or dev list. Lets see what Timothy Potter and others will say.
          Show
          Marius Dumitru Florea added a comment - Ahmet Arslan thanks, I've send a mail, see http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201406.mbox/%3CCALZcbBZHB8V32EPBWCpw3KOZ8hRCoT_L6vBFhkgwKe8fGAGEKw%40mail.gmail.com%3E .
          Hide
          Hoss Man added a comment -

          i feel like there are actaully two issues here that should be addressed..

          1) we should remove the fieldTypes that are deprecated from the example schema – it's important that those types of warnings are logged for those classes so users who upgrade with their existing configs see them – but there is no reason for them to exist in the example conigs and cause warnings for new users just starting out (note: the fieldTypes are defined, but totally unused in the example configs)

          2) the managed resource stuff should not log a warning just because there is no data to manage yet – lots of people aren't going to use it, so that noise shouldn't be a warning.

          since #2 is fundamentally differnet and unrealted to #1, i've split #2 off into it's own issue: SOLR-6179

          Show
          Hoss Man added a comment - i feel like there are actaully two issues here that should be addressed.. 1) we should remove the fieldTypes that are deprecated from the example schema – it's important that those types of warnings are logged for those classes so users who upgrade with their existing configs see them – but there is no reason for them to exist in the example conigs and cause warnings for new users just starting out (note: the fieldTypes are defined, but totally unused in the example configs) 2) the managed resource stuff should not log a warning just because there is no data to manage yet – lots of people aren't going to use it, so that noise shouldn't be a warning. since #2 is fundamentally differnet and unrealted to #1, i've split #2 off into it's own issue: SOLR-6179
          Hide
          ASF subversion and git services added a comment -

          Commit 1603644 from hossman@apache.org in branch 'dev/trunk'
          [ https://svn.apache.org/r1603644 ]

          SOLR-6128: Removed deprecated analysis factories and fieldTypes from the example schema.xml

          Show
          ASF subversion and git services added a comment - Commit 1603644 from hossman@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1603644 ] SOLR-6128 : Removed deprecated analysis factories and fieldTypes from the example schema.xml
          Hide
          ASF subversion and git services added a comment -

          Commit 1603649 from hossman@apache.org in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1603649 ]

          SOLR-6128: Removed deprecated analysis factories and fieldTypes from the example schema.xml (merge r1603644)

          Show
          ASF subversion and git services added a comment - Commit 1603649 from hossman@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1603649 ] SOLR-6128 : Removed deprecated analysis factories and fieldTypes from the example schema.xml (merge r1603644)
          Hide
          ASF subversion and git services added a comment -

          Commit 1603654 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_9'
          [ https://svn.apache.org/r1603654 ]

          SOLR-6128: Removed deprecated analysis factories and fieldTypes from the example schema.xml (merge r1603644 via r1603649)

          Show
          ASF subversion and git services added a comment - Commit 1603654 from hossman@apache.org in branch 'dev/branches/lucene_solr_4_9' [ https://svn.apache.org/r1603654 ] SOLR-6128 : Removed deprecated analysis factories and fieldTypes from the example schema.xml (merge r1603644 via r1603649)

            People

            • Assignee:
              Hoss Man
              Reporter:
              Omer Arslan
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development