To give LUCENE-9228 more CI cycles
This commit is contained in:
parent
85b4e45093
commit
e6755afeeb
|
@ -1,5 +1,5 @@
|
|||
elasticsearch = 7.7.0
|
||||
lucene = 8.5.0-snapshot-b01d7cb
|
||||
lucene = 8.5.0-snapshot-c4475920b08
|
||||
|
||||
bundled_jdk_vendor = adoptopenjdk
|
||||
bundled_jdk = 13.0.2+8
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
b3d969d1d63fe9500fe5308b1a0c60d84d7bfa92
|
|
@ -0,0 +1 @@
|
|||
48cb44f1dc8d3368d70581ffdbeab98ac5f5167f
|
|
@ -1 +0,0 @@
|
|||
d81b8f0ecdc67ba74049e65702582fcb8b605cfd
|
|
@ -0,0 +1 @@
|
|||
0748be5811dfe6725847d2e87890a990c58cc3de
|
|
@ -1 +0,0 @@
|
|||
13e9fd71cb3992b148728fe4884b7a6d0e26ee78
|
|
@ -0,0 +1 @@
|
|||
f693cd60ad8ca9b7d3082f7b9ee6054b9c819b48
|
|
@ -1 +0,0 @@
|
|||
58638e06cd1221b1d4de01705882922936ad69c9
|
|
@ -0,0 +1 @@
|
|||
72c34e18af81ee1d18e9927fb95690fe056cbd4f
|
|
@ -1 +0,0 @@
|
|||
346c87ed2ef2c6af49a434c568635a50cce64f2e
|
|
@ -0,0 +1 @@
|
|||
655438348dcad9a98b5affa76caa3d67aa4bee51
|
|
@ -1 +0,0 @@
|
|||
82ab2570c88053439912c5de5ed81cbe4337e450
|
|
@ -0,0 +1 @@
|
|||
b99147dad649fce0b0423e41f90c79e0f2fba2b7
|
|
@ -1 +0,0 @@
|
|||
ef0703ff5dc1b704ea3e58596b91e4b08c326d4c
|
|
@ -0,0 +1 @@
|
|||
00ce3e23cf7aba8c1b3e777de92fd31ec1d4d814
|
|
@ -1 +0,0 @@
|
|||
9cf8ce62436a3768e18c431cf3be43f5e2672b24
|
|
@ -0,0 +1 @@
|
|||
2b03f79d61517d8e6a8744dbd89e61ad661f6a62
|
|
@ -1 +0,0 @@
|
|||
4d358d392a9825c1502499d0a649730208f03777
|
|
@ -0,0 +1 @@
|
|||
1963afb27f340df8fc304d377971424832f4ce1a
|
|
@ -1 +0,0 @@
|
|||
17a0b6597c5bbe6cc2fc6d46003cdf9bc937c593
|
|
@ -0,0 +1 @@
|
|||
fdff4122e8b8a2dbbc9de24be6963e7d7e33b794
|
|
@ -1 +0,0 @@
|
|||
9c54e267bfa2cd1ef904dc6e35b38bbedda4c4b1
|
|
@ -0,0 +1 @@
|
|||
ca406661129d35008411365d2b6e747dc39378af
|
|
@ -1 +0,0 @@
|
|||
a14fb545a10fcead07fbb0d801fdebce88192211
|
|
@ -0,0 +1 @@
|
|||
db053d5861406393254c28f6e46767879b504bb3
|
|
@ -1 +0,0 @@
|
|||
25314c94f5cbcd8e360b74fb9980fc42e3641c94
|
|
@ -0,0 +1 @@
|
|||
f5520ee7145f5d1ef02c7dc87483255d81b5bc6c
|
|
@ -1 +0,0 @@
|
|||
efe41313b6733a0d2764052972c4e27a7ca7636f
|
|
@ -0,0 +1 @@
|
|||
2d81c0a3473cc865e7c4858890b7fbfb869bfbf8
|
|
@ -1 +0,0 @@
|
|||
f19fb11eb40f9d1bf77272de1cbd8c83e6463829
|
|
@ -0,0 +1 @@
|
|||
6d009afeb485307dce111afb8bb157ebbbb0f212
|
|
@ -1 +0,0 @@
|
|||
4295e60e1079c32dc19d1b070db3e62e04f07232
|
|
@ -0,0 +1 @@
|
|||
3a62908ec9eb6e826a56e697322c4c6b6c9a8573
|
|
@ -1 +0,0 @@
|
|||
1555f90440c10250e084d36c27e0da0b760d0296
|
|
@ -0,0 +1 @@
|
|||
d71d54ed6e0cf482ce16cf4f419441d83f646827
|
|
@ -1 +0,0 @@
|
|||
4fd374ffc3ec3c82d62d0811d78b044833a8dfa1
|
|
@ -0,0 +1 @@
|
|||
181915a7d21b73dff16591b20cdee22648e4181f
|
|
@ -1 +0,0 @@
|
|||
9e47dbe97818dd6caccf03e2ead6282d5e86bd3c
|
|
@ -0,0 +1 @@
|
|||
d3d0bb76d9f4a5368d286a934615dbca7703b3d8
|
|
@ -1 +0,0 @@
|
|||
bb9fa551d6d0929d5fd37c524c8c284de3f6786e
|
|
@ -0,0 +1 @@
|
|||
95b9fd35e91a34c090ecf301d4dc29cabd198e6f
|
|
@ -1 +0,0 @@
|
|||
28c935b5eb84a85ac24432c8c630fa4b47f5fd54
|
|
@ -0,0 +1 @@
|
|||
1c8da46c3a172830372dfc23e18e9151bb14562c
|
|
@ -1 +0,0 @@
|
|||
25089b0f516df58e95f345504607853e7ba0a35d
|
|
@ -0,0 +1 @@
|
|||
b3ad5d3476ed85a529892962d057518555ccfcc9
|
|
@ -33,6 +33,7 @@ import org.apache.lucene.queries.ExtendedCommonTermsQuery;
|
|||
import org.apache.lucene.search.BooleanClause;
|
||||
import org.apache.lucene.search.BooleanClause.Occur;
|
||||
import org.apache.lucene.search.BooleanQuery;
|
||||
import org.apache.lucene.search.BoostAttribute;
|
||||
import org.apache.lucene.search.FuzzyQuery;
|
||||
import org.apache.lucene.search.MultiTermQuery;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
@ -60,6 +61,7 @@ import org.elasticsearch.index.query.support.QueryParsers;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -274,7 +276,7 @@ public class MatchQuery {
|
|||
&& (fieldType instanceof TextFieldMapper.TextFieldType || fieldType instanceof KeywordFieldMapper.KeywordFieldType)) {
|
||||
return builder.newPrefixQuery(term);
|
||||
} else {
|
||||
return builder.newTermQuery(term);
|
||||
return builder.newTermQuery(term, BoostAttribute.DEFAULT_BOOST);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,7 +564,7 @@ public class MatchQuery {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Query newTermQuery(Term term) {
|
||||
protected Query newTermQuery(Term term, float boost) {
|
||||
Supplier<Query> querySupplier;
|
||||
if (fuzziness != null) {
|
||||
querySupplier = () -> {
|
||||
|
@ -613,7 +615,8 @@ public class MatchQuery {
|
|||
final Term term = new Term(field, termAtt.getBytesRef());
|
||||
int lastOffset = offsetAtt.endOffset();
|
||||
stream.end();
|
||||
return isPrefix && lastOffset == offsetAtt.endOffset() ? newPrefixQuery(term) : newTermQuery(term);
|
||||
return isPrefix && lastOffset == offsetAtt.endOffset() ?
|
||||
newPrefixQuery(term) : newTermQuery(term, BoostAttribute.DEFAULT_BOOST);
|
||||
}
|
||||
|
||||
private void add(BooleanQuery.Builder q, String field, List<Term> current, BooleanClause.Occur operator, boolean isPrefix) {
|
||||
|
@ -624,11 +627,14 @@ public class MatchQuery {
|
|||
if (isPrefix) {
|
||||
q.add(newPrefixQuery(current.get(0)), operator);
|
||||
} else {
|
||||
q.add(newTermQuery(current.get(0)), operator);
|
||||
q.add(newTermQuery(current.get(0), BoostAttribute.DEFAULT_BOOST), operator);
|
||||
}
|
||||
} else {
|
||||
// We don't apply prefix on synonyms
|
||||
q.add(newSynonymQuery(current.toArray(new Term[current.size()])), operator);
|
||||
final TermAndBoost[] termAndBoosts = current.stream()
|
||||
.map(t -> new TermAndBoost(t, BoostAttribute.DEFAULT_BOOST))
|
||||
.toArray(TermAndBoost[]::new);
|
||||
q.add(newSynonymQuery(termAndBoosts), operator);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -739,10 +745,13 @@ public class MatchQuery {
|
|||
Term[] terms = graph.getTerms(field, start);
|
||||
assert terms.length > 0;
|
||||
if (terms.length == 1) {
|
||||
queryPos = usePrefix ? newPrefixQuery(terms[0]) : newTermQuery(terms[0]);
|
||||
queryPos = usePrefix ? newPrefixQuery(terms[0]) : newTermQuery(terms[0], BoostAttribute.DEFAULT_BOOST);
|
||||
} else {
|
||||
// We don't apply prefix on synonyms
|
||||
queryPos = newSynonymQuery(terms);
|
||||
final TermAndBoost[] termAndBoosts = Arrays.stream(terms)
|
||||
.map(t -> new TermAndBoost(t, BoostAttribute.DEFAULT_BOOST))
|
||||
.toArray(TermAndBoost[]::new);
|
||||
queryPos = newSynonymQuery(termAndBoosts);
|
||||
}
|
||||
}
|
||||
if (queryPos != null) {
|
||||
|
|
|
@ -180,16 +180,16 @@ public class MultiMatchQuery extends MatchQuery {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Query newSynonymQuery(Term[] terms) {
|
||||
protected Query newSynonymQuery(TermAndBoost[] terms) {
|
||||
BytesRef[] values = new BytesRef[terms.length];
|
||||
for (int i = 0; i < terms.length; i++) {
|
||||
values[i] = terms[i].bytes();
|
||||
values[i] = terms[i].term.bytes();
|
||||
}
|
||||
return blendTerms(context, values, commonTermsCutoff, tieBreaker, lenient, blendedFields);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Query newTermQuery(Term term) {
|
||||
protected Query newTermQuery(Term term, float boost) {
|
||||
return blendTerm(context, term.bytes(), commonTermsCutoff, tieBreaker, lenient, blendedFields);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.lucene.queryparser.classic.ParseException;
|
|||
import org.apache.lucene.queryparser.classic.Token;
|
||||
import org.apache.lucene.queryparser.classic.XQueryParser;
|
||||
import org.apache.lucene.search.BooleanClause;
|
||||
import org.apache.lucene.search.BoostAttribute;
|
||||
import org.apache.lucene.search.BoostQuery;
|
||||
import org.apache.lucene.search.DisjunctionMaxQuery;
|
||||
import org.apache.lucene.search.FuzzyQuery;
|
||||
|
@ -588,7 +589,7 @@ public class QueryStringQueryParser extends XQueryParser {
|
|||
if (isLastPos) {
|
||||
posQuery = currentFieldType.prefixQuery(plist.get(0), getMultiTermRewriteMethod(), context);
|
||||
} else {
|
||||
posQuery = newTermQuery(new Term(field, plist.get(0)));
|
||||
posQuery = newTermQuery(new Term(field, plist.get(0)), BoostAttribute.DEFAULT_BOOST);
|
||||
}
|
||||
} else if (isLastPos == false) {
|
||||
// build a synonym query for terms in the same position.
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.lucene.index.Term;
|
|||
import org.apache.lucene.queryparser.simple.SimpleQueryParser;
|
||||
import org.apache.lucene.search.BooleanClause;
|
||||
import org.apache.lucene.search.BooleanQuery;
|
||||
import org.apache.lucene.search.BoostAttribute;
|
||||
import org.apache.lucene.search.BoostQuery;
|
||||
import org.apache.lucene.search.DisjunctionMaxQuery;
|
||||
import org.apache.lucene.search.MatchNoDocsQuery;
|
||||
|
@ -104,7 +105,7 @@ public class SimpleQueryStringQueryParser extends SimpleQueryParser {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Query newTermQuery(Term term) {
|
||||
protected Query newTermQuery(Term term, float boost) {
|
||||
MappedFieldType ft = context.fieldMapper(term.field());
|
||||
if (ft == null) {
|
||||
return newUnmappedFieldQuery(term.field());
|
||||
|
@ -259,7 +260,7 @@ public class SimpleQueryStringQueryParser extends SimpleQueryParser {
|
|||
if (isLastPos) {
|
||||
posQuery = new PrefixQuery(new Term(field, plist.get(0)));
|
||||
} else {
|
||||
posQuery = newTermQuery(new Term(field, plist.get(0)));
|
||||
posQuery = newTermQuery(new Term(field, plist.get(0)), BoostAttribute.DEFAULT_BOOST);
|
||||
}
|
||||
} else if (isLastPos == false) {
|
||||
// build a synonym query for terms in the same position.
|
||||
|
|
|
@ -194,7 +194,7 @@ public abstract class AnalysisFactoryTestCase extends ESTestCase {
|
|||
.put("concatenategraph", Void.class)
|
||||
// LUCENE-8936
|
||||
.put("spanishminimalstem", Void.class)
|
||||
|
||||
.put("delimitedboost", Void.class)
|
||||
.immutableMap();
|
||||
|
||||
static final Map<String,Class<?>> KNOWN_CHARFILTERS = new MapBuilder<String,Class<?>>()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
9c54e267bfa2cd1ef904dc6e35b38bbedda4c4b1
|
|
@ -0,0 +1 @@
|
|||
ca406661129d35008411365d2b6e747dc39378af
|
Loading…
Reference in New Issue