[ https://issues.apache.org/jira/browse/SOLR-15814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simone updated SOLR-15814: -------------------------- Description: h2. The problem I'm trying to delete the following properties from the _location_rpt_ field, but the schema api are ineffective: * omitNorms, * omitTermFreqAndPositions * termPositions * omitPositions * termOffsets h2. Why I'm doing that My objective is to remove some warnings as (see https://issues.apache.org/jira/browse/SOLR-15333 ) : * FieldType SpatialRecursivePrefixTreeFieldType does not allow *termOffsets* to be specified in schema, hardcoded behavior is termOffsets=false * FieldType SpatialRecursivePrefixTreeFieldType does not allow *termPositions* to be specified in schema, hardcoded behavior is termPositions=false >From what I understand I need to remove those properties to let Solr use the >default value h2. How I'm doing that I'm using schema api for both creating my schema (after copying the _default config) and editing the _location_rpt_ field type. The default managed-schema I'm copying as a base: {code:java} <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>{code} Note: the properties I'm trying to remove are not present. The field definition before my changes: {code:java} $ curl http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt { "responseHeader":{ "status":0, "QTime":1}, "fieldType":{ "name":"location_rpt", "class":"solr.SpatialRecursivePrefixTreeFieldType", "geo":"true", "omitNorms":true, "omitTermFreqAndPositions":true, "maxDistErr":"0.001", "termOffsets":false, "distErrPct":"0.025", "distanceUnits":"kilometers", "termPositions":false, "omitPositions":true}} {code} My changes through schema api (I'm replacing the whole field definition, omitting the properties I don't want) : {code:java} $ curl -X POST -H 'Content-type:application/json' --data-binary '{ "replace-field-type":{ "name":"location_rpt", "class": "solr.SpatialRecursivePrefixTreeFieldType", "geo": "true", "maxDistErr": "2", "distErrPct": "3", "distanceUnits": "kilometers"} }' http://localhost:8983/api/collections/my_collection/schema { "responseHeader":{ "status":0, "QTime":442}} {code} Note: I changed other values (maxDistErr and distErrPct) to see if changes took effect The current field definition: {code:java} $ curl http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt { "responseHeader":{ "status":0, "QTime":0}, "fieldType":{ "name":"location_rpt", "class":"solr.SpatialRecursivePrefixTreeFieldType", "geo":"true", "omitNorms":true, "omitTermFreqAndPositions":true, "maxDistErr":"2", "termOffsets":false, "distErrPct":"3", "distanceUnits":"kilometers", "termPositions":false, "omitPositions":true}} {code} The properties to be deleted are still present, but the other properties value has changed. was: h2. The problem I'm trying to delete the following properties from the _location_rpt_ field, but the schema api are ineffective: * omitNorms, * omitTermFreqAndPositions * termPositions * omitPositions * termOffsets h2. Why I'm doing that My objective is to remove some warnings as: * FieldType SpatialRecursivePrefixTreeFieldType does not allow *termOffsets* to be specified in schema,​ hardcoded behavior is termOffsets=false * FieldType SpatialRecursivePrefixTreeFieldType does not allow *termPositions* to be specified in schema,​ hardcoded behavior is termPositions=false >From what I understand I need to remove those properties to let Solr use the >default value h2. How I'm doing that I'm using schema api for both creating my schema (after copying the _default config) and editing the _location_rpt_ field type. The default managed-schema I'm copying as a base: {code:java} <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>{code} Note: the properties I'm trying to remove are not present. The field definition before my changes: {code:java} $ curl http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt { "responseHeader":{ "status":0, "QTime":1}, "fieldType":{ "name":"location_rpt", "class":"solr.SpatialRecursivePrefixTreeFieldType", "geo":"true", "omitNorms":true, "omitTermFreqAndPositions":true, "maxDistErr":"0.001", "termOffsets":false, "distErrPct":"0.025", "distanceUnits":"kilometers", "termPositions":false, "omitPositions":true}} {code} My changes through schema api (I'm replacing the whole field definition, omitting the properties I don't want) : {code:java} $ curl -X POST -H 'Content-type:application/json' --data-binary '{ "replace-field-type":{ "name":"location_rpt", "class": "solr.SpatialRecursivePrefixTreeFieldType", "geo": "true", "maxDistErr": "2", "distErrPct": "3", "distanceUnits": "kilometers"} }' http://localhost:8983/api/collections/my_collection/schema { "responseHeader":{ "status":0, "QTime":442}} {code} Note: I changed other values (maxDistErr and distErrPct) to see if changes took effect The current field definition: {code:java} $ curl http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt { "responseHeader":{ "status":0, "QTime":0}, "fieldType":{ "name":"location_rpt", "class":"solr.SpatialRecursivePrefixTreeFieldType", "geo":"true", "omitNorms":true, "omitTermFreqAndPositions":true, "maxDistErr":"2", "termOffsets":false, "distErrPct":"3", "distanceUnits":"kilometers", "termPositions":false, "omitPositions":true}} {code} The properties to be deleted are still present, but the other properties value has changed. > Can't change location_rpt field definition > ------------------------------------------ > > Key: SOLR-15814 > URL: https://issues.apache.org/jira/browse/SOLR-15814 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: Schema and Analysis > Affects Versions: 8.11 > Reporter: Simone > Priority: Minor > > h2. The problem > I'm trying to delete the following properties from the _location_rpt_ field, > but the schema api are ineffective: > * omitNorms, > * omitTermFreqAndPositions > * termPositions > * omitPositions > * termOffsets > h2. Why I'm doing that > My objective is to remove some warnings as (see > https://issues.apache.org/jira/browse/SOLR-15333 ) : > * FieldType SpatialRecursivePrefixTreeFieldType does not allow *termOffsets* > to be specified in schema, hardcoded behavior is termOffsets=false > * FieldType SpatialRecursivePrefixTreeFieldType does not allow > *termPositions* to be specified in schema, hardcoded behavior is > termPositions=false > From what I understand I need to remove those properties to let Solr use the > default value > h2. How I'm doing that > I'm using schema api for both creating my schema (after copying the _default > config) and editing the _location_rpt_ field type. > The default managed-schema I'm copying as a base: > {code:java} > <fieldType name="location_rpt" > class="solr.SpatialRecursivePrefixTreeFieldType" geo="true" > distErrPct="0.025" maxDistErr="0.001" distanceUnits="kilometers"/>{code} > Note: the properties I'm trying to remove are not present. > The field definition before my changes: > > {code:java} > $ curl > http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt > { > "responseHeader":{ > "status":0, > "QTime":1}, > "fieldType":{ > "name":"location_rpt", > "class":"solr.SpatialRecursivePrefixTreeFieldType", > "geo":"true", > "omitNorms":true, > "omitTermFreqAndPositions":true, > "maxDistErr":"0.001", > "termOffsets":false, > "distErrPct":"0.025", > "distanceUnits":"kilometers", > "termPositions":false, > "omitPositions":true}} > {code} > My changes through schema api (I'm replacing the whole field definition, > omitting the properties I don't want) : > > {code:java} > $ curl -X POST -H 'Content-type:application/json' --data-binary '{ > "replace-field-type":{ > "name":"location_rpt", > "class": "solr.SpatialRecursivePrefixTreeFieldType", > "geo": "true", > "maxDistErr": "2", > "distErrPct": "3", > "distanceUnits": "kilometers"} > }' http://localhost:8983/api/collections/my_collection/schema > { > "responseHeader":{ > "status":0, > "QTime":442}} > {code} > Note: I changed other values (maxDistErr and distErrPct) to see if changes > took effect > The current field definition: > {code:java} > $ curl > http://localhost:8983/api/collections/my_collection/schema/fieldtypes/location_rpt > { > "responseHeader":{ > "status":0, > "QTime":0}, > "fieldType":{ > "name":"location_rpt", > "class":"solr.SpatialRecursivePrefixTreeFieldType", > "geo":"true", > "omitNorms":true, > "omitTermFreqAndPositions":true, > "maxDistErr":"2", > "termOffsets":false, > "distErrPct":"3", > "distanceUnits":"kilometers", > "termPositions":false, > "omitPositions":true}} > {code} > The properties to be deleted are still present, but the other properties > value has changed. > > -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org