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 Mysurf Mail <st...@gmail.com> on 2013/10/13 11:32:12 UTC

Adding field to solr dynamically

My database model is designed using dynamic attributes (Entity Attribute
Value model). For the db I have a service that adds a new attribute. But
everytime a new attributes is added I need to add it to the schema.xml

Is there a possibile way to add a field to solr schama.xml dynamically?

Re: Adding field to solr dynamically

Posted by Mysurf Mail <st...@gmail.com>.
Thanks.


On Sun, Oct 13, 2013 at 4:18 PM, Jack Krupansky <ja...@basetechnology.com>wrote:

> Either simply use a dynamic field, or use the Schema API to add a static
> field:
> https://cwiki.apache.org/**confluence/display/solr/**Schema+API<https://cwiki.apache.org/confluence/display/solr/Schema+API>
>
> Dynamic fields (your nominal field name plus a suffix that specifies the
> type and muliplicity - as detailed in the Solr example schema) may be good
> enough, depending on the rest of your requirements.
>
> -- Jack Krupansky
>
> -----Original Message----- From: Mysurf Mail
> Sent: Sunday, October 13, 2013 5:32 AM
> To: solr-user@lucene.apache.org
> Subject: Adding field to solr dynamically
>
>
> My database model is designed using dynamic attributes (Entity Attribute
> Value model). For the db I have a service that adds a new attribute. But
> everytime a new attributes is added I need to add it to the schema.xml
>
> Is there a possibile way to add a field to solr schama.xml dynamically?
>

Re: Adding field to solr dynamically

Posted by Jack Krupansky <ja...@basetechnology.com>.
Either simply use a dynamic field, or use the Schema API to add a static 
field:
https://cwiki.apache.org/confluence/display/solr/Schema+API

Dynamic fields (your nominal field name plus a suffix that specifies the 
type and muliplicity - as detailed in the Solr example schema) may be good 
enough, depending on the rest of your requirements.

-- Jack Krupansky

-----Original Message----- 
From: Mysurf Mail
Sent: Sunday, October 13, 2013 5:32 AM
To: solr-user@lucene.apache.org
Subject: Adding field to solr dynamically

My database model is designed using dynamic attributes (Entity Attribute
Value model). For the db I have a service that adds a new attribute. But
everytime a new attributes is added I need to add it to the schema.xml

Is there a possibile way to add a field to solr schama.xml dynamically?