lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <>
Subject [jira] [Commented] (SOLR-3251) dynamically add field to schema
Date Mon, 15 Apr 2013 16:10:17 GMT


Steve Rowe commented on SOLR-3251:

bq. SchemaCodecFactory and SchemaSimilarityFactory don't change codec and similarity when
the schema is swapped out: instead they refer to the latest version they have been inform()'d

Can you elaborate on this (maybe just some code comments about which inform() gets called
when)? I don't understand why there should be 2 inform methods or what its doing... ?

When a new schema with added fields is produced, the {{inform(schema)}} SchemaAware variant
is called - this is not just a marker interface.

The {{inform(core)}} SolrCoreAware variant is called when a new core is instantiated, including
on {{SolrCore.reload()}}.  Looking now, though, I can see that in the SolrCore ctor, a new
codec is pulled from the CodecFactory, so {{inform(core)}} isn't needed for it. 

For similarity, which is hosted on the IndexSchema, {{inform(core)}} won't have any effect.

So it looks like the right thing to do is remove SolrCoreAware from both factories.  I'll
do that.  SchemaAware needs to remain, though, so that the schema references can track the
latest versions.

bq. Schema is now effectively immutable: requests see the same schema snapshot for their lifetimes.

well, except it seems for similarity (on indexsearcher)... which could be looking at the latest

Yes, that's right: similarity and codec both will be looking at the latest copy.
> dynamically add field to schema
> -------------------------------
>                 Key: SOLR-3251
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Yonik Seeley
>            Assignee: Steve Rowe
>             Fix For: 4.3
>         Attachments: SOLR-3251.patch, SOLR-3251.patch, SOLR-3251.patch, SOLR-3251.patch
> One related piece of functionality needed for SOLR-3250 is the ability to dynamically
add a field to the schema.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message