apache / apache/lucene

MoreLikeThis incorrectly does toString on Field object [LUCENE-7354]

Open
#8,408 9 comments 0 reactions 1 assignee Claimed by @gsingers View on GitHub
affects-version:5.5.1 affects-version:6.0.1 affects-version:7.0 legacy-jira-priority:Minor type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

In MoreLikeThis.java, circa line 763, when calling addTermFrequencies on a Field object, we are incorrectly calling toString on the Field object, which puts the Field attributes (indexed, stored, et. al) into the String that is returned.

I'll put up a patch/fix shortly.

---
Migrated from [LUCENE-7354](https://issues.apache.org/jira/browse/LUCENE-7354) by Grant Ingersoll (@gsingers), updated Jul 01 2016
Attachments: [LUCENE-7354-mlt-fix](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-7354/LUCENE-7354-mlt-fix)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.