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 "Van Tassell, Kristian" <kr...@siemens.com> on 2013/06/12 21:05:33 UTC

Dynamically create new fields

We have a need to dynamically create new fields. These fields would mostly be used for new facet types.

While I could modify, as needed, the schema, that presents some deployment issues (such as needing to restart the Solr service). Whereas, something such as elasticsearch's schema-free model, where fields do not need to be defined ahead of time seems more like what we need.

I've tried to come up with alternatives, such as a predefined dynamic field that could take name:value pairs separated by some type of delimeter, but given that the data type may be different per new definition, for one, along with that being just a clunky design overall, I can't seem to figure out a way to do this.

Does anyone have any ideas or can you point me to a write-up or documentation that addresses this?

Thanks,
Kristian

Re: Dynamically create new fields

Posted by Steve Rowe <sa...@gmail.com>.
I wrote a blog post about this stuff here: <http://searchhub.org/2013/05/21/schemaless-solr-part-1/>. - Steve

On Jun 12, 2013, at 3:26 PM, Chris Hostetter <ho...@fucit.org> wrote:

> 
> : Dynamically adding fields to schema is yet to get released..
> : 
> : https://issues.apache.org/jira/browse/SOLR-3251
> 
> Just to clarify...
> 
> *explicitly* adding fields dynamicly based on client commands has been 
> implimented and will be included in Solr 4.4
> 
> *implicitly* adding fields dynamically based on what documents are added 
> to the index is a feature that sarowe is still currently working on...
> 
> https://issues.apache.org/jira/browse/SOLR-3250
> 
> 
> -Hoss


RE: Dynamically create new fields

Posted by "Van Tassell, Kristian" <kr...@siemens.com>.
Great, thank you!

-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@fucit.org] 
Sent: Wednesday, June 12, 2013 2:27 PM
To: solr-user@lucene.apache.org
Subject: Re: Dynamically create new fields


: Dynamically adding fields to schema is yet to get released..
: 
: https://issues.apache.org/jira/browse/SOLR-3251

Just to clarify...

*explicitly* adding fields dynamicly based on client commands has been implimented and will be included in Solr 4.4

*implicitly* adding fields dynamically based on what documents are added to the index is a feature that sarowe is still currently working on...

https://issues.apache.org/jira/browse/SOLR-3250


-Hoss

Re: Dynamically create new fields

Posted by Chris Hostetter <ho...@fucit.org>.
: Dynamically adding fields to schema is yet to get released..
: 
: https://issues.apache.org/jira/browse/SOLR-3251

Just to clarify...

*explicitly* adding fields dynamicly based on client commands has been 
implimented and will be included in Solr 4.4

*implicitly* adding fields dynamically based on what documents are added 
to the index is a feature that sarowe is still currently working on...

https://issues.apache.org/jira/browse/SOLR-3250


-Hoss

Re: Dynamically create new fields

Posted by bbarani <bb...@gmail.com>.
Dynamically adding fields to schema is yet to get released..

https://issues.apache.org/jira/browse/SOLR-3251

We used dynamic field and copy field for dynamically creating facets...

We had too many dynamic fields (retrieved from a database table) and we had
to make sure that facets exists for the new fields..

schema.xml example: 

<dynamicField name="idx_*" type="textgen"  indexed="true"  stored="true"
multiValued="true" /> 

<dynamicField name="*Facet" type="string"  indexed="true" 
multiValued="true" stored="false"/> 

 <copyField source="*" dest="*Facet" /> 

This way we were able to access the facets using the fieldname followed by
keyword 'Facet'

For ex: name field has facet field nameFacet




--
View this message in context: http://lucene.472066.n3.nabble.com/Dynamically-create-new-fields-tp4070029p4070031.html
Sent from the Solr - User mailing list archive at Nabble.com.