diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2010-05-04 02:01:00 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2010-05-04 02:01:00 +0000 |
commit | 33b3524268195a0798993690b54cead286da28fb (patch) | |
tree | 3522835f347d8671d44a9e9f966bd3fc4604699e /src/couchdb/couch_view_group.erl | |
parent | c2ddcc5d1c5fcbe712031df19ecc12c781d8b613 (diff) |
use keysearch BIF to search ejson props. Closes COUCHDB-747
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@940708 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_view_group.erl')
-rw-r--r-- | src/couchdb/couch_view_group.erl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/couchdb/couch_view_group.erl b/src/couchdb/couch_view_group.erl index 68966a88..5acc7bb8 100644 --- a/src/couchdb/couch_view_group.erl +++ b/src/couchdb/couch_view_group.erl @@ -502,16 +502,16 @@ get_group_info(State) -> % maybe move to another module design_doc_to_view_group(#doc{id=Id,body={Fields}}) -> - Language = proplists:get_value(<<"language">>, Fields, <<"javascript">>), - {DesignOptions} = proplists:get_value(<<"options">>, Fields, {[]}), - {RawViews} = proplists:get_value(<<"views">>, Fields, {[]}), + Language = couch_util:get_value(<<"language">>, Fields, <<"javascript">>), + {DesignOptions} = couch_util:get_value(<<"options">>, Fields, {[]}), + {RawViews} = couch_util:get_value(<<"views">>, Fields, {[]}), % add the views to a dictionary object, with the map source as the key DictBySrc = lists:foldl( fun({Name, {MRFuns}}, DictBySrcAcc) -> - MapSrc = proplists:get_value(<<"map">>, MRFuns), - RedSrc = proplists:get_value(<<"reduce">>, MRFuns, null), - {ViewOptions} = proplists:get_value(<<"options">>, MRFuns, {[]}), + MapSrc = couch_util:get_value(<<"map">>, MRFuns), + RedSrc = couch_util:get_value(<<"reduce">>, MRFuns, null), + {ViewOptions} = couch_util:get_value(<<"options">>, MRFuns, {[]}), View = case dict:find({MapSrc, ViewOptions}, DictBySrcAcc) of {ok, View0} -> View0; @@ -574,7 +574,7 @@ init_group(Db, Fd, #group{def_lang=Lang,views=Views}= {Count, Reduced} end, - case proplists:get_value(<<"collation">>, Options, <<"default">>) of + case couch_util:get_value(<<"collation">>, Options, <<"default">>) of <<"default">> -> Less = fun couch_view:less_json_ids/2; <<"raw">> -> |