[
https://issues.apache.org/jira/browse/SOLR-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12513702
]
Ryan McKinley commented on SOLR-308:
------------------------------------
If I'm following correct, this is a FieldType that generates a UUID regardless
of the input value:
public Field createField(SchemaField field, String externalVal, float
boost) {
// We ignore the external value and have our own
return super.createField(field, UUID.randomUUID().toString(),
boost);
}
What is a use case for that?
If you are looking for something like the sql auto increment, it might be a
good candidate for the new fangled 'UpdateRequestProcessor' -- this could check
if the input document has a uniqueKey - if not, add one and add the new value
to the response.
> Add a field that generates an unique id when you have none in your data to
> index
> --------------------------------------------------------------------------------
>
> Key: SOLR-308
> URL: https://issues.apache.org/jira/browse/SOLR-308
> Project: Solr
> Issue Type: New Feature
> Components: search
> Reporter: Thomas Peuss
> Priority: Minor
> Attachments: GeneratedId.patch
>
>
> This patch adds a field that generates an unique id when you have no unique
> id in your data you want to index.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.