Return-Path: X-Original-To: apmail-incubator-connectors-user-archive@minotaur.apache.org Delivered-To: apmail-incubator-connectors-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C44F9B7F2 for ; Tue, 10 Jan 2012 06:48:31 +0000 (UTC) Received: (qmail 35428 invoked by uid 500); 10 Jan 2012 06:48:30 -0000 Delivered-To: apmail-incubator-connectors-user-archive@incubator.apache.org Received: (qmail 35309 invoked by uid 500); 10 Jan 2012 06:48:22 -0000 Mailing-List: contact connectors-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-user@incubator.apache.org Delivered-To: mailing list connectors-user@incubator.apache.org Received: (qmail 35224 invoked by uid 99); 10 Jan 2012 06:48:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 06:48:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of daddywri@gmail.com designates 209.85.215.47 as permitted sender) Received: from [209.85.215.47] (HELO mail-lpp01m010-f47.google.com) (209.85.215.47) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jan 2012 06:48:09 +0000 Received: by lami14 with SMTP id i14so1728554lam.6 for ; Mon, 09 Jan 2012 22:47:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KskSW5nJGJC4H3RfM/3L9XCftzp2wL7fAj1tjYPVouA=; b=EC7Ov81Q58ZCLHHnqvf6L3fqcR707Xmulv0gqyirmgO+jhWB9ujBIj3ulwQX4PzPAi qzqplfRXXUaeilwWzc0YqwXhrnV8x6iZxAh86A/Xcgf+Q4Dv0X2aYjTDwsFtgirecvuB w8ZgNTn3CVyqof+cIM5zFtgC99kQHwRC+CvYs= MIME-Version: 1.0 Received: by 10.112.23.74 with SMTP id k10mr4177009lbf.35.1326178068531; Mon, 09 Jan 2012 22:47:48 -0800 (PST) Received: by 10.152.133.231 with HTTP; Mon, 9 Jan 2012 22:47:48 -0800 (PST) In-Reply-To: References: Date: Tue, 10 Jan 2012 01:47:48 -0500 Message-ID: Subject: Re: required attribute of solr-integration security fields From: Karl Wright To: connectors-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org The fields should be required="false" but with a default value of "__nosecurity__". I believe that means that if there is no field value attached to the document when it is sent to Solr, Solr will make sure it has the value "__nosecurity__". The tests for the components would not pass if "required" was true, so I am a little puzzled as to why you feel there is a problem here? Here's what the tests use for schema: Here's how the test documents are added: assertU(adoc("id", "da12", "allow_token_document", "token1", "allow_token_document", "token2")); assertU(adoc("id", "da13-dd3", "allow_token_document", "token1", "allow_token_document", "token3", "deny_token_document", "token3")); assertU(adoc("id", "sa123-sd13", "allow_token_share", "token1", "allow_token_share", "token2", "allow_token_share", "token3", "deny_token_share", "token1", "deny_token_share", "token3")); assertU(adoc("id", "sa3-sd1-da23", "allow_token_document", "token2", "allow_token_document", "token3", "allow_token_share", "token3", "deny_token_share", "token1")); assertU(adoc("id", "notoken")); Karl On Mon, Jan 9, 2012 at 11:12 PM, Shinichiro Abe wrote: > Hi. > > README[1] of solr-integration says that you will need to add security fields, > and specify required="false". > I should specify required="true" because MCF connectors always return any tokens > and we can't search anything if these fields have no tokens > (that is, null and these fields don't even have "__nosecurity__" that stands for no security token.) > when using MCF security plugin. > May I open JIRA ticket for modifying README? Is there a reason that should be required="false"? > > [1]https://svn.apache.org/repos/asf/incubator/lcf/trunk/connectors/solr/integration/README-3.x.txt > > Regards, > Shinichiro Abe