I can't reproduct what you're describing (detailed steps below) but I'm 
wondering...

: {
: "add-field": [
: {"name": "ANNOUNCEMENT_ID", "type": "newInt", "multiValued": false}
: ]
: }
: 
: I then get the field back looking like this
: 
: "announcemenT_ID":[1]

'ANNOUNCEMENT_ID' and 'announcemenT_ID' are different field names to solr.


hossman@slate:~/lucene/solr [j11] [tags/releases/solr/9.7.0] $ 
./solr/packaging/build/dev/bin/solr -e techproducts
...
hossman@slate:~/lucene/solr [j11] [tags/releases/solr/9.7.0] $ curl -X 
POST -H 'Content-type:application/json' --data-binary '{"add-field-type" : 
{"name": "newInt","class": "solr.IntPointField","multiValued": false}, 
"add-field":{"name": "ANNOUNCEMENT_ID", "type": "newInt", "multiValued": 
false}}' http://localhost:8983/solr/techproducts/schema
{
  "responseHeader":{
    "status":0,
    "QTime":577
  }
hossman@slate:~/lucene/solr [j11] [tags/releases/solr/9.7.0] $ curl -X 
POST -H 'Content-type:application/json' --data-binary '[{"id":"hoss", 
"ANNOUNCEMENT_ID":1}]' 
'http://localhost:8983/solr/techproducts/update?commit=true'
{
  "responseHeader":{
    "status":0,
    "QTime":111
  }
hossman@slate:~/lucene/solr [j11] [tags/releases/solr/9.7.0] $ curl 
'http://localhost:8983/solr/techproducts/select?wt=json&omitHeader=true&q=id:hoss'
{
  "response":{
    "numFound":1,
    "start":0,
    "numFoundExact":true,
    "docs":[{
      "id":"hoss",
      "ANNOUNCEMENT_ID":1,
      "_version_":1818002101907750912,
      "_root_":"hoss"
    }]
  }
}



-Hoss
http://www.lucidworks.com/

Reply via email to