本文整理了Java中org.apache.lucene.util.Version.equals()
方法的一些代码示例,展示了Version.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.equals()
方法的具体详情如下:
包路径:org.apache.lucene.util.Version
类名称:Version
方法名:equals
暂无
代码示例来源:origin: org.apache.lucene/lucene-core
/** Returns if the given segment should be upgraded. The default implementation
* will return {@code !Version.LATEST.equals(si.getVersion())},
* so all segments created with a different version number than this Lucene version will
* get upgraded.
*/
protected boolean shouldUpgradeSegment(SegmentCommitInfo si) {
return !Version.LATEST.equals(si.info.getVersion());
}
代码示例来源:origin: org.elasticsearch/elasticsearch
private static void checkLucene() {
if (Version.CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) == false) {
throw new AssertionError("Lucene version mismatch this version of Elasticsearch requires lucene version ["
+ Version.CURRENT.luceneVersion + "] but the current lucene version is [" + org.apache.lucene.util.Version.LATEST + "]");
}
}
代码示例来源:origin: org.apache.lucene/lucene-core
versionString = oldest.equals(newest) ? ( "version=" + oldest ) : ("versions=[" + oldest + " .. " + newest + "]");
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
private static void checkLucene() {
if (Version.CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) == false) {
throw new AssertionError("Lucene version mismatch this version of Elasticsearch requires lucene version ["
+ Version.CURRENT.luceneVersion + "] but the current lucene version is [" + org.apache.lucene.util.Version.LATEST + "]");
}
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
private static void checkLucene() {
if (Version.CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) == false) {
throw new AssertionError("Lucene version mismatch this version of Elasticsearch requires lucene version ["
+ Version.CURRENT.luceneVersion + "] but the current lucene version is [" + org.apache.lucene.util.Version.LATEST + "]");
}
}
代码示例来源:origin: apache/servicemix-bundles
private static void checkLucene() {
if (Version.CURRENT.luceneVersion.equals(org.apache.lucene.util.Version.LATEST) == false) {
throw new AssertionError("Lucene version mismatch this version of Elasticsearch requires lucene version ["
+ Version.CURRENT.luceneVersion + "] but the current lucene version is [" + org.apache.lucene.util.Version.LATEST + "]");
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
/** Returns if the given segment should be upgraded. The default implementation
* will return {@code !Version.LATEST.equals(si.getVersion())},
* so all segments created with a different version number than this Lucene version will
* get upgraded.
*/
protected boolean shouldUpgradeSegment(SegmentCommitInfo si) {
return !Version.LATEST.equals(si.info.getVersion());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
/** Returns if the given segment should be upgraded. The default implementation
* will return {@code !Version.LATEST.equals(si.getVersion())},
* so all segments created with a different version number than this Lucene version will
* get upgraded.
*/
protected boolean shouldUpgradeSegment(SegmentCommitInfo si) {
return !Version.LATEST.equals(si.info.getVersion());
}
代码示例来源:origin: harbby/presto-connectors
/** Returns if the given segment should be upgraded. The default implementation
* will return {@code !Version.LATEST.equals(si.getVersion())},
* so all segments created with a different version number than this Lucene version will
* get upgraded.
*/
protected boolean shouldUpgradeSegment(SegmentCommitInfo si) {
return !Version.LATEST.equals(si.info.getVersion());
}
代码示例来源:origin: com.vmware.dcp/dcp-common
private void upgradeIndex(Directory dir) throws IOException {
boolean doUpgrade = false;
IndexWriterConfig iwc = new IndexWriterConfig(null);
CheckIndex chkIndex = new CheckIndex(dir);
try {
for (CheckIndex.Status.SegmentInfoStatus segmentInfo : chkIndex
.checkIndex().segmentInfos) {
if (!segmentInfo.version.equals(Version.LATEST)) {
logInfo("Found Index version %s", segmentInfo.version.toString());
doUpgrade = true;
break;
}
}
} finally {
chkIndex.close();
}
if (doUpgrade) {
logInfo("Upgrading index to %s", Version.LATEST.toString());
new IndexUpgrader(dir, iwc, false).upgrade();
this.indexUpdateTimeMicros = Utils.getNowMicrosUtc();
}
}
代码示例来源:origin: vmware/xenon
private void upgradeIndex(Directory dir) throws IOException {
boolean doUpgrade = false;
String lastSegmentsFile = SegmentInfos.getLastCommitSegmentsFileName(dir.listAll());
SegmentInfos sis = SegmentInfos.readCommit(dir, lastSegmentsFile);
for (SegmentCommitInfo commit : sis) {
if (!commit.info.getVersion().equals(Version.LATEST)) {
logInfo("Found Index version %s", commit.info.getVersion().toString());
doUpgrade = true;
break;
}
}
if (doUpgrade) {
logInfo("Upgrading index to %s", Version.LATEST.toString());
IndexWriterConfig iwc = new IndexWriterConfig(null);
new IndexUpgrader(dir, iwc, false).upgrade();
this.writerUpdateTimeMicros = Utils.getNowMicrosUtc();
}
}
代码示例来源:origin: org.infinispan/infinispan-embedded-query
versionString = oldest.equals(newest) ? ( "version=" + oldest ) : ("versions=[" + oldest + " .. " + newest + "]");
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.lucene
versionString = oldest.equals(newest) ? ( "version=" + oldest ) : ("versions=[" + oldest + " .. " + newest + "]");
代码示例来源:origin: harbby/presto-connectors
versionString = oldest.equals(newest) ? ( "version=" + oldest ) : ("versions=[" + oldest + " .. " + newest + "]");
内容来源于网络,如有侵权,请联系作者删除!