lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/SOLR-3251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13631814#comment-13631814
] 

Steve Rowe commented on SOLR-3251:
----------------------------------

{quote}
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
about.

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... ?
{quote}

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.

{quote}
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
copy?
{quote}

Yes, that's right: similarity and codec both will be looking at the latest copy.
                
> dynamically add field to schema
> -------------------------------
>
>                 Key: SOLR-3251
>                 URL: https://issues.apache.org/jira/browse/SOLR-3251
>             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: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message