You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dionte Smith <di...@gm.com> on 2019/02/25 17:08:26 UTC
Schema configuration field defaults
Hi,
I have two questions about the field default values for multivalued and indexed.
1. Is it possible to make new fields have the indexed attribute set to false by default for a schema? I understand this wouldn't normally be the case, but we have a use case where it would be preferable as many fields may be dynamically added via JSON.
2. Is it possible to do the same for the multivalued attribute? If so, what would happen if a field was dynamically added via JSON and it was contained an array? Would Solr be able to determine that the field should instead be created with the multivalued attribute set to true?
Kind Regards,
Dionté Smith
Software Developer
dionte.smith@gm.com<ma...@gm.com>
Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.
Re: Schema configuration field defaults
Posted by Erick Erickson <er...@gmail.com>.
Sure. In both cases define a fieldType with those attributes set however you want. Any field that is defined with that fieldType will have the defaults you specify unless overridden on the field definition itself.
Best,
Erick
> On Feb 25, 2019, at 9:08 AM, Dionte Smith <di...@gm.com> wrote:
>
> Hi,
>
> I have two questions about the field default values for multivalued and indexed.
>
>
> 1. Is it possible to make new fields have the indexed attribute set to false by default for a schema? I understand this wouldn't normally be the case, but we have a use case where it would be preferable as many fields may be dynamically added via JSON.
> 2. Is it possible to do the same for the multivalued attribute? If so, what would happen if a field was dynamically added via JSON and it was contained an array? Would Solr be able to determine that the field should instead be created with the multivalued attribute set to true?
>
> Kind Regards,
>
> Dionté Smith
> Software Developer
> dionte.smith@gm.com<ma...@gm.com>
>
>
>
> Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
>
> Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.