title: why i am getting this error ? "Query was already executed: Product.find({ price: { '$lte': 1000, '$gte': 1 } })"
body: <p>I am fetching API request from my frontend as I am using reactjs
  When I try to filter product by price I am getting unexpected error:</p>
  <p><strong>axios call</strong></p>
  <pre><code>axios.get(`/api/v1/products?keyword=${keyword}&amp;page=${currentPage}&amp;price[lte]=${price[1]}&amp;price[gte]=${price[0]}`)
  </code></pre>
  <p><strong>Backend</strong>
  In my backend i am handling the get request as</p>
  <pre><code>exports.getProducts =  (req, res, next) =&gt; {
    const resPerPage = 4;
    const productsCount = await Product.countDocuments();
  
    const apiFeatures = new APIFeatures(Product.find(), req.query)
      .search()
      .filter();
  
    let products = await apiFeatures.query;
    let filteredProductsCount = products.length;
  
    apiFeatures.pagination(resPerPage);
    products = await apiFeatures.query;
  
    res.status(200).json({
      success: true,
      productsCount,
      resPerPage,
      filteredProductsCount,
      products,
    });
  };
  </code></pre>
  <p>and my APIFeatures.js is</p>
  <pre><code>class APIFeatures {
    constructor(query, queryStr) {
      this.query = query;
      this.queryStr = queryStr;
    }
    search() {
      const keyword = this.queryStr.keyword
        ? {
            name: {
              $regex: this.queryStr.keyword,
              $options: 'i',
            },
          }
        : {};
      this.query = this.query.find({ ...keyword });
      return this;
    }
    filter() {
      const queryCopy = { ...this.queryStr };
  
      // removing fields from the query
      const removeFields = ['keyword', 'limit', 'page'];
      removeFields.forEach((el) =&gt; delete queryCopy[el]);
  
      //   advance filter for price, ratings etc
      let queryStr = JSON.stringify(queryCopy);
      queryStr = queryStr.replace(/\b(gt|gte|lt|lte)\b/g, (match) =&gt; `$${match}`);
  
      this.query = this.query.find(JSON.parse(queryStr));
      return this;
    }
    pagination(resPerPage) {
      const currentPage = Number(this.queryStr.page) || 1;
      const skip = resPerPage * (currentPage - 1);
      this.query = this.query.limit(resPerPage).skip(skip);
      return this;
    }
  }
  module.exports = APIFeatures;
  
  </code></pre>
  <p>But when i dispatch get request from my frontend i am getting error about my price filter</p>
  <p><strong>Error</strong></p>
  <pre><code>&quot;Query was already executed: Product.find({ price: { '$lte': 1000, '$gte': 1 } })&quot;
  </code></pre>