Commit 66d13f06 authored by Vincent Bechu's avatar Vincent Bechu

[mappingstorage] Fix full text search in allDocs

parent d7f11f46
...@@ -550,7 +550,7 @@ ...@@ -550,7 +550,7 @@
return one_query; return one_query;
} }
key = mapToMainProperty(storage, one_query.key, {}, {}); key = mapToMainProperty(storage, one_query.key, {}, {});
if (key) { if (key !== undefined) {
one_query.key = key; one_query.key = key;
return one_query; return one_query;
} }
......
...@@ -1416,6 +1416,59 @@ ...@@ -1416,6 +1416,59 @@
}); });
}); });
test("with extended_search", function () {
stop();
expect(1);
var jio = jIO.createJIO({
type: "mapping",
sub_storage: {
type: "query",
sub_storage: {
type: "uuid",
sub_storage: {
type: "memory"
}
}
}
});
jio.put("42",
{
"title": "foo",
"smth": "bar"
})
.push(function () {
return jio.allDocs({
query: "foo",
select_list: ["title"]
});
})
.push(function (result) {
deepEqual(result,
{
"data": {
"rows": [
{
"id": "42",
"value": {
"title": "foo"
},
"doc": {}
}
],
"total_rows": 1
}
}, "allDocs check");
})
.push(undefined, function (error) {
ok(false, error);
})
.always(function () {
start();
});
});
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// mappingStorage.bulk // mappingStorage.bulk
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment