List Info

Thread: Is it possibily to dynamically/programmatically add new fields




Is it possibily to dynamically/programmatically add new fields
country flaguser name
United Kingdom
2007-10-23 04:43:51
Hi there,

Is there a way in Solr to programmatically add new fields
(named and dynamic) 
so that they don't have to be defined statically within
"schema.xml" ?

thanks
Karen

Re: Is it possibily to dynamically/programmatically add new fields
country flaguser name
United States
2007-10-23 05:34:08
On Oct 23, 2007, at 5:43 AM, Karen Loughran wrote:
> Is there a way in Solr to programmatically add new
fields (named  
> and dynamic)
> so that they don't have to be defined statically within
"schema.xml" ?

  You can define field(s) with an asterisk in them like
this:

       <dynamicField name="*_s" 
type="string"  indexed="true"   
stored="true"/>

Such that anything_s maps to that configuration.    You
could change  
that to just name="*" so that all incoming field
names (not already  
statically defined or matching another dynamicField
definition)  map  
to that configuration.

	Erik

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )