Issue 1:
When querying with "preference": "_local" a different JSON parser is used.

$ curl -XPUT 'http://ks398280.kimsufi.com:9200/test/test/1' -d '{"user": "foo", "amount": 35, "data": "some more data"}'

$ curl -XPOST 'http://ks398280.kimsufi.com:9200/test/test/_search?pretty' -d '{
"query": {
"match": {
"data": {
"query": "some"
}
}
},
"fields": ["user", "amount"],
}'

{
"error" : "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[p5CLZtRvSC-3spyvNBNVng][test][4]: SearchParseException[[test][4]: query[data:some],from[-1],size[-1]: Parse Failure [Failed to parse source [{\n \"query\": {\n \"match\": {\n \"data\": {\n \"query\": \"some\"\n }\n }\n },\n \"fields\": [\"user\", \"amount\"],\n}]]]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@7a04355; line: 10, column: 2]]; }{[p5CLZtRvSC-3spyvNBNVng][test][3]: SearchParseException[[test][3]: query[data:some],from[-1],size[-1]: Parse Failure [Failed to parse source [{\n \"query\": {\n \"match\": {\n \"data\": {\n \"query\": \"some\"\n }\n }\n },\n \"fields\": [\"user\", \"amount\"],\n}]]]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@7a04355; line: 10, column: 2]]; }{[p5CLZtRvSC-3spyvNBNVng][test][2]: SearchParseException[[test][2]: query[data:some],from[-1],size[-1]: Parse Failure [Failed to parse source [{\n \"query\": {\n \"match\": {\n \"data\": {\n \"query\": \"some\"\n }\n }\n },\n \"fields\": [\"user\", \"amount\"],\n}]]]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@7a04355; line: 10, column: 2]]; }{[p5CLZtRvSC-3spyvNBNVng][test][0]: SearchParseException[[test][0]: query[data:some],from[-1],size[-1]: Parse Failure [Failed to parse source [{\n \"query\": {\n \"match\": {\n \"data\": {\n \"query\": \"some\"\n }\n }\n },\n \"fields\": [\"user\", \"amount\"],\n}]]]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@7a04355; line: 10, column: 2]]; }{[p5CLZtRvSC-3spyvNBNVng][test][1]: SearchParseException[[test][1]: query[data:some],from[-1],size[-1]: Parse Failure [Failed to parse source [{\n \"query\": {\n \"match\": {\n \"data\": {\n \"query\": \"some\"\n }\n }\n },\n \"fields\": [\"user\", \"amount\"],\n}]]]; nested: JsonParseException[Unexpected character ('}' (code 125)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: [B@7a04355; line: 10, column: 2]]; }]",
"status" : 400
}

But when using preference _local, the error disappears. Note that the error is the extra comma after the fields.

$ curl -XPOST 'http://ks398280.kimsufi.com:9200/test/test/_search?pretty' -d '{
"query": {
"match": {
"data": {
"query": "some"
}
},
"preference": "_local"
},
"fields": ["user", "amount"],
}'

{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.15342641,
"hits" : [ {
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_score" : 0.15342641, "_source" : {"user": "foo", "amount": 35, "data": "some more data"}
} ]
}
}

Issue 2:
When querying with "preference": "_local", the _source is returned instead of the requested fields.

$ curl -XPUT 'http://ks398280.kimsufi.com:9200/test/test/1' -d '{"user": "foo", "amount": 35, "data": "some more data"}'

$ curl -XPOST 'http://ks398280.kimsufi.com:9200/test/test/_search?pretty' -d '{
"query": {
"match": {
"data": {
"query": "some"
}
}
},
"fields": ["user", "amount"]
}'

{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.15342641,
"hits" : [ {
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_score" : 0.15342641,
"fields" : {
"amount" : 35,
"user" : "foo"
}
} ]
}
}

$ curl -XPOST 'http://ks398280.kimsufi.com:9200/test/test/_search?pretty' -d '{
"query": {
"match": {
"data": {
"query": "some"
}
},
"preference": "_local"
},
"fields": ["user", "amount"],
}'

{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.15342641,
"hits" : [ {
"_index" : "test",
"_type" : "test",
"_id" : "1",
"_score" : 0.15342641, "_source" : {"user": "foo", "amount": 35, "data": "some more data"}
} ]
}
}