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

David Smiley commented on SOLR-9778:
------------------------------------

Further notes:
The initial recording of luceneMatchVersion might be named 
"initialLuceneMatchVersion" (wherever it's placed) to underscore it's the 
version at the time the index was created.  It's supposed to never be modified, 
but would potentially be reset if the index is ever re-created, or if 
replication pulls an index from somewhere -- the initialLuceneMatchVersion 
should follow the index.  Same thing for restoration from a backup.  _It's 
metadata for the index._  

Perhaps it could be reset in the event of a core being loaded (or re-loaded) 
when there are no docs yet; that could be convenient to avoid a full-blown 
re-creation of the core/collection just to upgrade. You'd just need to delete 
all docs, commit, and issue a reload.  Users wouldn't _have_ to know about 
luceneMatchVersion to update easily.

I wonder if it could be placed in Lucene segment commit metadata.  It would 
move with the index transparently without touching various parts of Solr that 
would otherwise be affected.

> Make luceneMatchVersion handling easy/automatic
> -----------------------------------------------
>
>                 Key: SOLR-9778
>                 URL: https://issues.apache.org/jira/browse/SOLR-9778
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>
> I was thinking about luceneMatchVersion and how it's annoying to both explain 
> and get right, and maintain.  I think there's a way in Solr we can do this 
> way better:
> When an index is initialized, record the luceneMatchVersion in effect into a 
> file in the data directory, like luceneMatchVersion.txt.  It's a file that 
> will never be modified.
> The luceneMatchVersion in effect is the first of these that are specified:
> * {{<luceneMatchVersion>}} in solrconfig.xml
> * data/luceneMatchVersion.txt 
> * {{org.apache.lucene.util.Version.LATEST}}
> With this approach, we can eliminate putting {{<luceneMatchVersion>}} into 
> solrconfig.xml by default.  Most users will have no need to bother setting 
> it, even during an upgrade of either an existing index, or when they 
> re-index.  Of course there are cases where the user knows what they are doing 
> and insists on a different luceneMatchVersion, and they can specify that 
> still.
> Perhaps instead of a new file (data/luceneMatchVersion.txt), it might go into 
> core.properties.  I dunno.
> _(disclaimer: as I write this, I have no plans to work on this at the moment)_



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to