Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 72395036ef
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 29 lines (23 sloc) 0.947 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
%% -------------------------------------------------------------------
%%
%% Copyright (c) 2007-2010 Basho Technologies, Inc. All Rights Reserved.
%%
%% -------------------------------------------------------------------

-module(riak_search_op_negation).
-export([
         extract_scoring_props/1,
         preplan/2,
         chain_op/4
        ]).

-include("riak_search.hrl").
-include_lib("lucene_parser/include/lucene_parser.hrl").

extract_scoring_props(Op) ->
    riak_search_op:extract_scoring_props(Op#negation.op).

preplan(Op, State) ->
    ChildOp = riak_search_op:preplan(Op#negation.op, State),
    Op#negation { op=ChildOp }.

chain_op(Op, OutputPid, OutputRef, State) ->
    %% Higher order operations (specifically #intersection and #union)
    %% look for the presence of the #negation operator during merge
    %% joins. No actual work is done here.
    riak_search_op:chain_op(Op#negation.op, OutputPid, OutputRef, State).
Something went wrong with that request. Please try again.