fkaempfer opened a new issue #988: Mango /_find returns 500 with use_index URL: https://github.com/apache/couchdb/issues/988 This is a behavioral change between 2.1.0 and 2.1.1. Since 2.1.1 when a _find query is sent to Mango that specifies the index via use_index and the selector does not exactly match the index (notably if the selector excludes the indexed field). This also happens for more complex queries that use the fields specified on the index and some additional fields. ## Expected Behavior I think the behavior in 2.1.1 should be the same as in 2.1.0 or an error should be reported that explains the problem. ## Current Behavior CouchDB 2.1.1 returns ``` {"error":"badmatch","reason":"","ref":454115350} ``` The log file shows ` [<<"mango_cursor:create_cursor/4 L131">>,<<"mango_crud:find/5 L52">>,<<"mango_httpd:handle_find_req/2 L187">>,<<"mango_httpd:handle_req/2 L38">>,<<"chttpd:process_request/1 L295">>,<<"chttpd:handle_request_int/1 L231">>,<<"mochiweb_http:headers/6 L91">>,<<"proc_lib:init_p_do_apply/3 L247">>] [notice] 2017-11-13T13:17:23.450060Z couchdb@localhost <0.2939.1> 39235f44dc localhost:5984 127.0.0.1 undefined POST /test/_find 500 ok 1 ` ## Steps to Reproduce (for bugs) 1. Create a mango index in fauxton 2. Run a mango query in fauxton that excludes the field specified on the index but include use_index: ["designdocname","indexname"] ## Your Environment Fedora 26 / OTP 20.1 / CouchDB 2.1.1
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
