Permalink
Browse files

Revert "Honor the solr q.op param" -- it breaks rolling upgrade

This reverts commit 2a12ea8.
  • Loading branch information...
rzezeski committed Sep 26, 2011
1 parent 5fb0188 commit 67ca6efca7cd0a92c4d7e323aa3fd7a37df27315
Showing with 3 additions and 17 deletions.
  1. +0 −1 include/riak_search.hrl
  2. +1 −2 src/riak_search_client.erl
  3. +1 −8 src/riak_search_op_group.erl
  4. +1 −6 src/riak_solr_searcher_wm.erl
View
@@ -13,7 +13,6 @@
parent=undefined,
index=undefined,
field=undefined,
- default_op,
num_terms=0,
num_docs=0,
query_norm=0,
@@ -57,12 +57,11 @@ parse_query(IndexOrSchema, Query) ->
{ok, Schema} = riak_search_config:get_schema(IndexOrSchema),
DefaultIndex = Schema:name(),
DefaultField = Schema:default_field(),
- DefaultOp = Schema:default_op(),
{ok, Ops} = lucene_parser:parse(
riak_search_utils:to_list(DefaultIndex),
riak_search_utils:to_list(DefaultField),
riak_search_utils:to_list(Query)),
- {ok, riak_search_op:preplan(Ops, #search_state{default_op=DefaultOp})}.
+ {ok, riak_search_op:preplan(Ops)}.
%% Parse the provided filter. Returns either {ok, FilterOps} or {error,
%% Error}.
@@ -27,14 +27,7 @@ preplan(Op, State) ->
%% appropriately.
Index = State#search_state.index,
{ok, Schema} = riak_search_config:get_schema(Index),
- DefaultOp =
- case State#search_state.default_op of
- undefined ->
- Schema:default_op();
- Else ->
- Else
- end,
- case DefaultOp of
+ case Schema:default_op() of
'and' ->
NewOp = #intersection { id=Op#group.id, ops=OpList };
'or' ->
@@ -181,12 +181,7 @@ parse_squery(Req) ->
false ->
Filter = wrq:get_qs_value("filter", "", Req),
DefaultField = wrq:get_qs_value("df", undefined, Req),
- DefaultOp = case wrq:get_qs_value("q.op", undefined, Req) of
- undefined ->
- undefined;
- Other ->
- to_atom(string:to_lower(Other))
- end,
+ DefaultOp = to_atom(wrq:get_qs_value("q.op", undefined, Req)),
QueryStart = to_integer(wrq:get_qs_value("start", 0, Req)),
QueryRows = to_integer(wrq:get_qs_value("rows", ?DEFAULT_RESULT_SIZE, Req)),
SQuery = #squery{q=Query,

0 comments on commit 67ca6ef

Please sign in to comment.