[ 
https://issues.apache.org/jira/browse/SOLR-9150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15299518#comment-15299518
 ] 

Hoss Man commented on SOLR-9150:
--------------------------------

I don't particularly think this is a good idea (nor do i think general purpose 
field aliases -- as a high level configuration option -- would really solve any 
of hte underlying ambiguity problems) but if someone wanted to pursue this 
objective i would suggest implemetning it as an UpdateProcessor similar to how 
the the current AddSchemaFieldsUpdateProcessorFactory works using teh 
underlying ManagedSchema APIsto add fields -- but instead of saying "i see a 
'cost' field in this doc, but no 'cost' field in the schema, so i will add it 
using a configured/default type mapping" the logic could say "I see a 'cost_i' 
field in this doc, which matches a '\*_i' dynamic field, using a prefix of 
'cost'; since 'cost' does not already exist in the schema, i will copy the 
attributes from '\*_i' into a new 'cost' field and rename the 'cost_i' field in 
this document 'cost' before adding it"

> Add configuration option to strip type postfix from dynamic field name on 
> document indexing
> -------------------------------------------------------------------------------------------
>
>                 Key: SOLR-9150
>                 URL: https://issues.apache.org/jira/browse/SOLR-9150
>             Project: Solr
>          Issue Type: New Feature
>          Components: Server
>    Affects Versions: 6.0
>            Reporter: Peter Horvath
>
> In some cases, incorporating field type indication to the name of a dynamic 
> field is not desirable. 
> It would be great if there was a configuration option (global, instance level 
> or collection-level), which instructed Solr to create dynamic fields with the 
> type postfix stripped. 
> For example, suppose the schema contained a dynamic field with a name of 
> "*_i". If the user attempts to index a document with a "cost_i" field, but no 
> explicit "cost_i" field is defined in the schema, then a "cost" field 
> (without "_i" postfix) would be created with the field type and analysis 
> defined for "*_i". As a result queries could be executed against the dynamic 
> field being referred to without the type indicator postfix: "cost:10"
> To retain backward compatibility, this feature should have to be enabled 
> explicitly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to