9161eda6d5
Add a ChangeIndex interface and an implementation based on Apache Lucene[1] to provide a secondary index, indexing things we won't or can't index in the database. As an example, index the list of modified files in the most recent patch set of each change. Provide an EqualsFilePredicate for searching on exact filenames[2], and teach the query builder to rewrite such predicates as ChangeDataSources returning results from the index. As this feature is still experimental but we want to avoid prolonged feature branch development, protect it with an undocumented index.enabled boolean in gerrit.config. [1] http://lucene.apache.org/core/ [2] Uses the "file:" operator the same as RegexFilePredicate, but does not support regular expressions in the search context. Change-Id: Ie14ebe062d991eb9626f7b5d78b2d193c1bcb33f
53 lines
1.2 KiB
Python
53 lines
1.2 KiB
Python
java_library2(
|
|
name = 'init',
|
|
srcs = glob(['src/main/java/**/*.java']),
|
|
deps = [
|
|
'//gerrit-cache-h2:cache-h2',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-httpd:httpd',
|
|
'//gerrit-lucene:lucene',
|
|
'//gerrit-openid:openid',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:common_rules',
|
|
'//gerrit-server:server',
|
|
'//gerrit-sshd:sshd',
|
|
'//lib:gwtorm',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-servlet',
|
|
'//lib/log:api',
|
|
'//lib/jgit:jgit',
|
|
],
|
|
compile_deps = ['//lib:servlet-api-3_0'],
|
|
visibility = [
|
|
'//:',
|
|
'//gerrit-gwtdebug:gwtdebug',
|
|
'//tools/eclipse:classpath',
|
|
],
|
|
)
|
|
|
|
genrule(
|
|
name = 'webapp_assets',
|
|
cmd = 'cd $SRCDIR/src/main/webapp; zip -qr $OUT .',
|
|
srcs = glob(['src/main/webapp/**/*']),
|
|
deps = [],
|
|
out = 'webapp_assets.zip',
|
|
visibility = ['//:'],
|
|
)
|
|
|
|
genrule(
|
|
name = 'log4j-config__jar',
|
|
cmd = 'jar cf $OUT -C $(dirname $SRCS) .',
|
|
srcs = ['src/main/resources/log4j.properties'],
|
|
out = 'log4j-config.jar',
|
|
)
|
|
|
|
prebuilt_jar(
|
|
name = 'log4j-config',
|
|
binary_jar = genfile('log4j-config.jar'),
|
|
deps = [':log4j-config__jar'],
|
|
visibility = [
|
|
'//:',
|
|
'//tools/eclipse:classpath',
|
|
],
|
|
)
|