@@ -60,7 +60,7 @@ public class SearchRequest implements ActionRequest {
60
60
61
61
private String [] types = Strings .EMPTY_ARRAY ;
62
62
63
- private TObjectFloatHashMap <String > queryBoost = EMPTY ;
63
+ private TObjectFloatHashMap <String > indexBoost = EMPTY ;
64
64
65
65
private TimeValue timeout ;
66
66
@@ -191,15 +191,15 @@ public void timeout(TimeValue timeout) {
191
191
* Allows to set a dynamic query boost on an index level query. Very handy when, for example, each user has
192
192
* his own index, and friends matter more than friends of friends.
193
193
*/
194
- public TObjectFloatHashMap <String > queryBoost () {
195
- return queryBoost ;
194
+ public TObjectFloatHashMap <String > indexBoost () {
195
+ return indexBoost ;
196
196
}
197
197
198
- public SearchRequest queryBoost (String index , float queryBoost ) {
199
- if (this .queryBoost == EMPTY ) {
200
- this .queryBoost = new TObjectFloatHashMap <String >();
198
+ public SearchRequest indexBoost (String index , float indexBoost ) {
199
+ if (this .indexBoost == EMPTY ) {
200
+ this .indexBoost = new TObjectFloatHashMap <String >();
201
201
}
202
- this .queryBoost .put (index , queryBoost );
202
+ this .indexBoost .put (index , indexBoost );
203
203
return this ;
204
204
}
205
205
@@ -237,11 +237,11 @@ public SearchRequest size(int size) {
237
237
238
238
int size = in .readInt ();
239
239
if (size == 0 ) {
240
- queryBoost = EMPTY ;
240
+ indexBoost = EMPTY ;
241
241
} else {
242
- queryBoost = new TObjectFloatHashMap <String >(size );
242
+ indexBoost = new TObjectFloatHashMap <String >(size );
243
243
for (int i = 0 ; i < size ; i ++) {
244
- queryBoost .put (in .readUTF (), in .readFloat ());
244
+ indexBoost .put (in .readUTF (), in .readFloat ());
245
245
}
246
246
}
247
247
@@ -285,11 +285,11 @@ public SearchRequest size(int size) {
285
285
timeout .writeTo (out );
286
286
}
287
287
out .writeUTF (source );
288
- if (queryBoost == null ) {
288
+ if (indexBoost == null ) {
289
289
out .writeInt (0 );
290
290
} else {
291
- out .writeInt (queryBoost .size ());
292
- for (TObjectFloatIterator <String > it = queryBoost .iterator (); it .hasNext ();) {
291
+ out .writeInt (indexBoost .size ());
292
+ for (TObjectFloatIterator <String > it = indexBoost .iterator (); it .hasNext ();) {
293
293
it .advance ();
294
294
out .writeUTF (it .key ());
295
295
out .writeFloat (it .value ());
0 commit comments