New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for artificial documents in MLT query #7725
Conversation
@@ -95,11 +95,11 @@ public static Uid createUid(String uid) { | |||
return new Uid(uid.substring(0, delimiterIndex), uid.substring(delimiterIndex + 1)); | |||
} | |||
|
|||
public static BytesRef[] createUids(List<MultiGetRequest.Item> items) { | |||
BytesRef[] uids = new BytesRef[items.size()]; | |||
public static BytesRef[] createUids(List<TermVectorRequest> requests) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a new interface called DocumentRequest
that is more generic and I just checked that TermVectorRequest
implements all the methods already. I think we should do that and make this List<DocumentRequest>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thanks.
I left some minor comments looks good in general |
Previously, the only way to specify a document not present in the index was to use `like_text`. This would usually lead to complex queries made of multiple MLT queries per document field. This commit adds the ability to the MLT query to directly specify documents not present in the index (artificial documents). The syntax is similar to the Percolator API or to the Multi Term Vector API.
ac6a6a8
to
b5043ca
Compare
LGTM thanks alex!!! |
Previously, the only way to specify a document not present in the index was to use `like_text`. This would usually lead to complex queries made of multiple MLT queries per document field. This commit adds the ability to the MLT query to directly specify documents not present in the index (artificial documents). The syntax is similar to the Percolator API or to the Multi Term Vector API. Closes #7725
Previously, the only way to specify a document not present in the index was to
use
like_text
. This would usually lead to complex queries made of multipleMLT queries per document field. This commit adds the ability to the MLT query
to directly specify documents not present in the index (artificial documents).
The syntax is similar to the Percolator API or to the Multi Term Vector API.