Skip to content

Commit c363e8f

Browse files
committed
Merge pull request #1124 from elasticsearch/feature/termvector-doc
this adds support for passing in documents to termvector and mtervector
2 parents d4cf9e7 + aed4881 commit c363e8f

File tree

16 files changed

+862
-164
lines changed

16 files changed

+862
-164
lines changed

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/mtermvectors.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
12
{
23
"mtermvectors" : {
3-
"documentation" : "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-multi-termvectors.html",
4+
"documentation" : "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html",
45
"methods" : ["GET", "POST"],
56
"url" : {
67
"path" : "/_mtermvectors",
@@ -13,11 +14,7 @@
1314
"type" : {
1415
"type" : "string",
1516
"description" : "The type of the document."
16-
},
17-
"id" : {
18-
"type" : "string",
19-
"description" : "The id of the document."
20-
}
17+
}
2118
},
2219
"params" : {
2320
"ids" : {
@@ -74,11 +71,16 @@
7471
"type" : "string",
7572
"description" : "Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
7673
"required" : false
74+
},
75+
"realtime": {
76+
"type" : "boolean",
77+
"description" : "Specifies if requests are real-time as opposed to near-real-time (default: true).",
78+
"required" : false
7779
}
7880
}
7981
},
8082
"body" : {
81-
"description" : "Define ids, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.",
83+
"description" : "Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.",
8284
"required" : false
8385

8486
}

src/CodeGeneration/CodeGeneration.LowLevelClient/ApiEndpoints/termvector.json

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"termvector" : {
3-
"documentation" : "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-termvectors.html",
3+
"documentation" : "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html",
44
"methods" : ["GET", "POST"],
55
"url" : {
6-
"path" : "/{index}/{type}/{id}/_termvector",
7-
"paths" : ["/{index}/{type}/{id}/_termvector"],
6+
"path" : "/{index}/{type}/_termvector",
7+
"paths" : ["/{index}/{type}/_termvector", "/{index}/{type}/{id}/_termvector"],
88
"parts" : {
99
"index" : {
1010
"type" : "string",
@@ -18,8 +18,7 @@
1818
},
1919
"id" : {
2020
"type" : "string",
21-
"description" : "The id of the document.",
22-
"required" : true
21+
"description" : "The id of the document, when not specified a doc param should be supplied."
2322
}
2423
},
2524
"params": {
@@ -72,11 +71,16 @@
7271
"type" : "string",
7372
"description" : "Parent id of documents.",
7473
"required" : false
74+
},
75+
"realtime": {
76+
"type" : "boolean",
77+
"description" : "Specifies if request is real-time as opposed to near-real-time (default: true).",
78+
"required" : false
7579
}
7680
}
7781
},
7882
"body": {
79-
"description" : "Define parameters. See documentation.",
83+
"description" : "Define parameters and or supply a document to get termvectors for. See documentation.",
8084
"required" : false
8185
}
8286
}

src/Elasticsearch.Net/Domain/RequestParameters/RequestParameters.Generated.cs

+22-2
Original file line numberDiff line numberDiff line change
@@ -4725,7 +4725,7 @@ public MultiSearchRequestParameters SearchType(SearchType search_type)
47254725

47264726
///<summary>Request parameters descriptor for MtermvectorsGet
47274727
///<pre>
4728-
///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-multi-termvectors.html
4728+
///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html
47294729
///</pre>
47304730
///</summary>
47314731
public class MultiTermVectorsRequestParameters : FluentRequestParameters<MultiTermVectorsRequestParameters>
@@ -4820,6 +4820,16 @@ public MultiTermVectorsRequestParameters Parent(string parent)
48204820
return this;
48214821
}
48224822

4823+
4824+
internal bool _realtime { get; set; }
4825+
///<summary>Specifies if requests are real-time as opposed to near-real-time (default: true).</summary>
4826+
public MultiTermVectorsRequestParameters Realtime(bool realtime)
4827+
{
4828+
this._realtime = realtime;
4829+
this.AddQueryString("realtime", this._realtime);
4830+
return this;
4831+
}
4832+
48234833
}
48244834

48254835

@@ -5955,7 +5965,7 @@ public SuggestRequestParameters Source(string source)
59555965

59565966
///<summary>Request parameters descriptor for TermvectorGet
59575967
///<pre>
5958-
///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.4/docs-termvectors.html
5968+
///http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html
59595969
///</pre>
59605970
///</summary>
59615971
public class TermvectorRequestParameters : FluentRequestParameters<TermvectorRequestParameters>
@@ -6050,6 +6060,16 @@ public TermvectorRequestParameters Parent(string parent)
60506060
return this;
60516061
}
60526062

6063+
6064+
internal bool _realtime { get; set; }
6065+
///<summary>Specifies if request is real-time as opposed to near-real-time (default: true).</summary>
6066+
public TermvectorRequestParameters Realtime(bool realtime)
6067+
{
6068+
this._realtime = realtime;
6069+
this.AddQueryString("realtime", this._realtime);
6070+
return this;
6071+
}
6072+
60536073
}
60546074

60556075

0 commit comments

Comments
 (0)