Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8247

Schema API with ManagedIndexSchemaFactory needs reload for timesteamp

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.2.1
    • None
    • Data-driven Schema
    • None
    • Solr 5.2.1, Managed-Schema-Type Collection

    Description

      Schema API is not reloading the collection, When a timestamp field is added through 'addField' api, for a collection that has ManagedIndexSchemaFactory.

      Steps to reproduce:

      Add a field with defatult="NOW" attribute using 'addField' api

      curl -X POST Content-Type application/json {
        "add-field":{
           "name":"timestamp",
           "type":"date",
          "indexed":true,
          "multiValued":false,
          "default":"NOW",
           "stored":true }
      }http://localhost:8983/solr/gettingstarted/schema
      
      

      There will be an entry[1] in managed-schema but the collection is not reloaded and therefore the timestamp would still not get added to document.

      [1]<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>

      Make an explicit reload call and then you'd see the timestamp getting added to each document.
      http://localhost:8983/solr/admin/collections?action=RELOAD&name=<collection_name>

      Attachments

        Activity

          People

            Unassigned Unassigned
            rajanimaski rajanimaski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: