// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.search({
  query: {
    weighted_tokens: {
      query_expansion_field: {
        tokens: {
          "2161": 0.4679,
          "2621": 0.307,
          "2782": 0.1299,
          "2851": 0.1056,
          "3088": 0.3041,
          "3376": 0.1038,
          "3467": 0.4873,
          "3684": 0.8958,
          "4380": 0.334,
          "4542": 0.4636,
          "4633": 2.2805,
          "4785": 1.2628,
          "4860": 1.0655,
          "5133": 1.0709,
          "7139": 1.0016,
          "7224": 0.2486,
          "7387": 0.0985,
          "7394": 0.0542,
          "8915": 0.369,
          "9156": 2.8947,
          "10505": 0.2771,
          "11464": 0.3996,
          "13525": 0.0088,
          "14178": 0.8161,
          "16893": 0.1376,
          "17851": 1.5348,
          "19939": 0.6012,
        },
        pruning_config: {
          tokens_freq_ratio_threshold: 5,
          tokens_weight_threshold: 0.4,
          only_score_pruned_tokens: false,
        },
      },
    },
  },
});
console.log(response);
----
