[ 
https://issues.apache.org/jira/browse/SOLR-3251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Rowe updated SOLR-3251:
-----------------------------

    Attachment: SOLR-3251.patch

Patch:

- Restores SolrIndexSearcher.getSchema(), but makes it return the schema 
snapshot passed into the SolrIndexSearcher ctor, rather than the latest 
available schema from SolrCore.
- Converts query request code to pull the schema from a searcher if one is 
already available.
- Removes all fields and non-static methods from o.a.s.update.DocumentBuilder - 
this is dead code.
- Removes DIH's o.a.s.handler.dataimport.config.Document entirely - this is 
dead code.
- Reworks DIH schema handling, so that DIHConfiguration, which is created 
per-request, hosts a schema snapshot and derived schema info (lowercase field 
mappings). 
- ExternalFileFieldReloader's newSearcher() callback now checks if the schema 
has changed, and if so, reloads its FileFloatSource cache.

I tried converting query code to always pull a searcher from the request and 
then pull the schema from there, rather than from the request, but this caused 
lots of imbalanced searcher refcounts, because searchers weren't already bound 
to the request in some cases, and request.close() apparently wasn't always 
invoked in some tests.  So I backtracked and only pulled the schema from 
already-available searchers.

So we'll now have three schema sources: 

# SolrCore.getLatestSchema()
# SolrQueryRequest.getSchema() - schema snapshot at request construction
# SolrIndexSearcher.getSchema() - schema snapshot at searcher construction

Update code will use the schema snapshot from the request, when available, and 
the latest schema from SolrCore when it's not.

I believe that since the only permitted schema change now is new fields, it's 
okay for query code to also pull the schema from the request, and for update 
code to also pull the latest schema from SolrCore.


                
> dynamically add fields 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, 5.0
>
>         Attachments: SOLR-3251.patch, SOLR-3251.patch, SOLR-3251.patch, 
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to