Skip to content

Commit

Permalink
More highlighter-related test fixes (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
reta authored and nknize committed Mar 15, 2022
1 parent f8e21b5 commit 360c7d2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ public void testSynonyms() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/2063")
public void testPhrasePrefix() throws IOException {
Settings.Builder builder = Settings.builder()
.put(indexSettings())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,6 @@ public void testHasParentInnerQueryType() {
assertSearchHits(searchResponse, "child-id");
}

@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/2063")
public void testHighlightersIgnoreParentChild() throws IOException {
assertAcked(
prepareCreate("test").addMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public void testAnnotatedTextSingleFieldWithBreakIterator() throws Exception {
assertHighlightOneDoc("text", markedUpInputs, query, Locale.ROOT, breakIterator, 0, expectedPassages);
}

@AwaitsFix(bugUrl = "https://fixbugForLUCENE9")
public void testAnnotatedTextSingleFieldWithPhraseQuery() throws Exception {
final String[] markedUpInputs = { "[Donald Trump](Donald+Trump) visited Singapore", "Donald Jr was with Melania Trump" };
String[] expectedPassages = { "[Donald](_hit_term=donald) [Trump](_hit_term=trump) visited Singapore" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3301,7 +3301,7 @@ public void testCopyToFields() throws Exception {
b.endObject().endObject();
prepareCreate("test").addMapping("type", b).get();

client().prepareIndex("test", "type")
client().prepareIndex("test")
.setId("1")
.setSource(jsonBuilder().startObject().field("foo", "how now brown cow").endObject())
.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
/**
* Forked from Lucene 8.x; removed in Lucene 8.9
*
* @todo further investigate a better alternative
* Todo: further investigate a better alternative
*
* Simplistic compression for array of unsigned long values. Each value is {@code >= 0} and {@code
* <=} a specified maximum value. The values are stored as packed ints, with each value consuming a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ private Translog.Operation readDocAsOp(int docIndex) throws IOException {
: SourceFieldMapper.NAME;
final FieldsVisitor fields = new FieldsVisitor(true, sourceField);
leaf.reader().document(segmentDocID, fields);
// todo: remove postProcess after removing types and uid from translog
fields.postProcess(mapperService);

final Translog.Operation op;
final boolean isTombstone = parallelArray.isTombStone[docIndex];
Expand Down

0 comments on commit 360c7d2

Please sign in to comment.