-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store and verify AnalyzerGuru and Analyzer versions #2066
Conversation
ok, I think this PR is a good step towards the generic upgrade code, that will allow incremental update from old lucene versions ... |
ok, lgtm, I am curious on size impact on index for huge projects so getSpecializedVersionNo will need to be upgraded whenever you change the analyzer ... OK |
the only thing that comes to my mind if this update of version number won't be done automagically (e.g. from timestamp of class?) |
but I guess we can start like this ... |
(with the motto better to have a small change in right direction than no change at all :-D ) |
... with upgrader from binary serialization of v1 IndexAnalysisSettings.
@tarzanek , I pushed that change to avoid redundant storage of analyzer version.
No not easily possible automatically I'm afraid. The version number is stored on the analyzer class but is representing possible changes in multiple objects related to the language; e.g. to related |
Ping, @tarzanek |
sorry for the delays, been stuck in with another nosql big data problem :) , |
looks OK to me, not sure if the indexanalysis settings upgrader and new class is needed |
Hello,
Please consider for integration this patch to store and verify version numbers for
AnalyzerGuru
,FileAnalyzer
, andFileAnalyzer
subclasses so that re-analysis can be done in a targeted manner as needed upon certain reconfigurations or upon deploying a new OpenGrok release.AnalyzerGuru
version number is a 64-bit value composed from:FileAnalyzer
subclass (as for the patches in queue to support Forth [4be83daf29] and Objective-C [fbd7de4f249d]) or when existing matching logic is altered (e.g., changing a supported suffix for Fortran).-A,--analyzer
or by using the newOPENGROK_ASSIGNMENTS
environment variable.On finding a mismatch of
AnalyzerGuru
version for a storedDocument
, OpenGrok will re-determine the appropriate analyzer for the file (possibly changing e.g. fromPlainAnalyzer
toObjectiveCAnalyzer
) or decide that the existing analyzer is appropriate and do nothing.FileAnalyzer
and subclasses' version number is a 64-bit value composed from:FileAnalyzer
base class that applies to all analyzers.FileAnalyzer
subclass.On finding a mismatch of analyzer version, OpenGrok will re-analyze a file. Such a targeted version update might be used e.g. when fixing a specific support for a specific language's syntax.
(Updating the base class
FileAnalyzer
version will be done very rarely when new developments require that all files be re-analyzed but without requiring users to manually delete their own indexes.)Thank you.