manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1665465 - in /manifoldcf/integration/solr-5.x/branches/release-2.1-branch: ./ README.txt
Date Tue, 10 Mar 2015 10:49:19 GMT
Author: kwright
Date: Tue Mar 10 10:49:19 2015
New Revision: 1665465

URL: http://svn.apache.org/r1665465
Log:
Pull up README change from trunk.

Modified:
    manifoldcf/integration/solr-5.x/branches/release-2.1-branch/   (props changed)
    manifoldcf/integration/solr-5.x/branches/release-2.1-branch/README.txt

Propchange: manifoldcf/integration/solr-5.x/branches/release-2.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 10 10:49:19 2015
@@ -9,3 +9,4 @@
 /lucene/dev/branches/realtime_search:953476-1097796
 /lucene/dev/branches/solr2452:1087601-1144716
 /manifoldcf/integration/solr-4.x/branches/CONNECTORS-914:1583544-1583849
+/manifoldcf/integration/solr-5.x/trunk:1665464

Modified: manifoldcf/integration/solr-5.x/branches/release-2.1-branch/README.txt
URL: http://svn.apache.org/viewvc/manifoldcf/integration/solr-5.x/branches/release-2.1-branch/README.txt?rev=1665465&r1=1665464&r2=1665465&view=diff
==============================================================================
--- manifoldcf/integration/solr-5.x/branches/release-2.1-branch/README.txt (original)
+++ manifoldcf/integration/solr-5.x/branches/release-2.1-branch/README.txt Tue Mar 10 10:49:19
2015
@@ -53,30 +53,67 @@ a Query Parser plugin.  The second is us
 the first step is to have ManifoldCF installed and running.  See:
 http://manifoldcf.apache.org/release/trunk/en_US/how-to-build-and-deploy.html
 
-Then, you will need to add fields to your Solr schema.xml file that can be used
-to contain document authorization information.  There will need to be six of these
-fields, an 'allow' field for documents, parents, and shares, and a 'deny' field for
-documents, parents, and shares.  For example:
-
-  <field name="allow_token_document" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
-  <field name="allow_token_parent" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
-  <field name="allow_token_share" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
-  <field name="deny_token_document" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
-  <field name="deny_token_parent" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
-  <field name="deny_token_share" type="string" indexed="true" stored="false"
-    multiValued="true" required="false" default="__nosecurity__"/>
+Then, in order to store the document authorization information you need to add
+'allow' and 'deny' fields for documents, parents, and shares to your Solr
+index. Depending on your schemaFactory setting in solrconfig.xml you have to 
+use either the schema.xml file for 'ClassicIndexSchemaFactory' or the schema
+API for 'ManagedIndexSchemaFactory'. 
+See section 'Managed Schema Definition in SolrConfig' in the Solr Reference Gude
+https://www.apache.org/dyn/closer.cgi/lucene/solr/ref-guide/apache-solr-ref-guide-5.0.pdf
+
+For schema.xml simply add the following field definitions to the <schema>
+section:
+
+  <field name="allow_token_document" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+  <field name="allow_token_parent" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+  <field name="allow_token_share" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+  <field name="deny_token_document" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+  <field name="deny_token_parent" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+  <field name="deny_token_share" type="string" indexed="true" stored="true"
+    multiValued="true" required="true" default="__nosecurity__"/>
+
+To define the fields via schema API use the curl command instead:
+
+curl -X POST -H 'Content-type:application/json' --data-binary '{ 
+  "add-field" : [
+  { "name":"allow_token_document", "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true",
+    "default":"__nosecurity__" },
+  { "name":"allow_token_parent",   "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true",
+    "default":"__nosecurity__" },
+  { "name":"allow_token_share",    "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true", 
+    "default":"__nosecurity__" },
+  { "name":"deny_token_document",  "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true",
+    "default":"__nosecurity__" },
+  { "name":"deny_token_parent",    "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true",
+    "default":"__nosecurity__" },
+  { "name":"deny_token_share",     "type":"string", "indexed":"true",
+    "stored":"true", "multiValued":"true", "required":"true",
+    "default":"__nosecurity__"}
+]}' http://localhost:8983/solr/<collection_name>/schema
+
+Replace <collection_name> with your core or collection name respectively.
+
+The default value of "__nosecurity__" is manadatory because the queries will be
+rewritten to use all of these 6 fields. If a field is missing in the index then
+you will get no results for your search.
 
-The default value of "__nosecurity__" is required by this plugin, so do not forget
-to include it.
+Check the field definitions with
+
+curl http://localhost:8983/solr/<collection_name>/schema/fields
 
 
 Using the Query Parser Plugin
-----------------------------
+-----------------------------
 
 To set up the query parser plugin, modify your solrconfig.xml to add the query parser:
 
@@ -89,7 +126,7 @@ To set up the query parser plugin, modif
 
 Hook up the search component in the solrconfig.xml file wherever you want it, e.g.:
 
-<requestHandler name="search" class="solr.SearchHandler" default="true">
+<requestHandler name="/select" class="solr.SearchHandler">
   <lst name="appends">
     <str name="fq">{!manifoldCFSecurity}</str>
   </lst>
@@ -98,7 +135,7 @@ Hook up the search component in the solr
 
 
 Using the Search Component
-----------------------------
+--------------------------
 
 To set up the search component, modify your solrconfig.xml to add the search component:
 
@@ -111,7 +148,7 @@ To set up the search component, modify y
 
 Hook up the search component in the solrconfig.xml file wherever you want it, e.g.:
 
-<requestHandler name="search" class="solr.SearchHandler" default="true">
+<requestHandler name="/select" class="solr.SearchHandler">
   <arr name="last-components">
     <str>manifoldCFSecurity</str>
   </arr>



Mime
View raw message