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: <!-- MCF Security fields --> <field name="allow_token_document" type="string" indexed="true" stored="false" multiValued="true" default="__nosecurity__"/> <field name="deny_token_document" type="string" indexed="true" stored="false" multiValued="true" default="__nosecurity__"/> <field name="allow_token_share" type="string" indexed="true" stored="false" multiValued="true" default="__nosecurity__"/> <field name="deny_token_share" type="string" indexed="true" stored="false" multiValued="true" default="__nosecurity__"/> 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 <shinichiro.ab...@gmail.com> 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