lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (SOLR-3251) dynamically add fields to schema
Date Thu, 18 Apr 2013 21:54:14 GMT


Robert Muir commented on SOLR-3251:

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: 

I don't think we should make bad design decisions because of a few bad tests? They should
be closing this thing, and its just random chance that the current implementation doesnt leak
anything if nobody called certain methods yet.

There is a real value i think in having request.getSchema() == request.getSearcher().getSchema().

I took the patch locally and tried this in and it didnt seem like
such a disaster to me:

  // The index schema associated with this request
  public IndexSchema getSchema() {
    SolrIndexSearcher s = getSearcher();
    if (s == null) {
      return null;
    } else {
      return s.getSchema();

> dynamically add fields to schema
> --------------------------------
>                 Key: SOLR-3251
>                 URL:
>             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:

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

View raw message