manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Brendel <frank.bren...@eurolog.com>
Subject Re: No results from solr with mcf plugin
Date Mon, 09 Mar 2015 14:05:41 GMT
Aha, and this is the Schemaless Mode and a schema.xml will be ignored.

Anyway I can change the schema via the Schema API.

# 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":"deny_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":"deny_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_share",     "type":"string", "indexed":"true", 
"stored":"true", "multiValued":"true", "required":"true", 
"default":"__nosecurity__"}
]}' http://localhost:8983/solr/elcore/schema

Could someone be so kind and add this to the Solr plugin README?


Kind regards
Frank


Am 06.03.2015 um 13:55 schrieb Frank Brendel:
> My fault.
>
> 'solr create' without the configuration directory uses the 
> data_driven_schema_configs which 'can mutate as data indexed'.
>
> Ok, I am still learning ;-)
>
>
> Thanks
> Frank
>
> Am 06.03.2015 um 13:25 schrieb Frank Brendel:
>> Hi Karl,
>>
>> it seems that reading the README is not enough.
>>
>> What I've done is:
>>
>> # tar xf solr-5.0.0.tgz
>> # cd solr-5.0.0
>> # bin/solr start
>> # bin/solr create -c elcore
>> # mkdir server/solr/elcore/lib
>> # cp solr-mcf-4.6-SNAPSHOT.jar server/solr/elcore/lib
>> # cp server/solr/configsets/basic_configs/conf/schema.xml 
>> server/solr/elcore/conf
>> Edit server/solr/elcore/conf/solrconfig.xml and 
>> server/solr/elcore/conf/schema.xml according to the plugins README.
>> # bin/solr restart
>> Start the ManifoldCF job.
>>
>> Did I understood something wrong?
>>
>>
>> Kind regards
>> Frank
>>
>>
>>
>> Am 06.03.2015 um 12:40 schrieb Karl Wright:
>>> The README in the solr plugin is a pretty good resource for how to 
>>> configure Solr, BTW.
>>>
>>> Karl
>>>
>>>
>>> On Fri, Mar 6, 2015 at 6:39 AM, Karl Wright <daddywri@gmail.com 
>>> <mailto:daddywri@gmail.com>> wrote:
>>>
>>>     Hi Frank,
>>>
>>>     Yes, you need all SIX attributes, with the proper default
>>>     values.  In fact, you will need to force a reindex if you didn't
>>>     have working definitions, since otherwise the default values in
>>>     solr don't take effect.
>>>
>>>     Karl
>>>
>>>
>>>     On Fri, Mar 6, 2015 at 6:28 AM, Frank Brendel
>>>     <frank.brendel@eurolog.com <mailto:frank.brendel@eurolog.com>>
>>>     wrote:
>>>
>>>         Hi Paul,
>>>
>>>         this could actually be the problem.
>>>
>>>         Because when I debug the query I get in
>>>         "parsed_filter_queries" something like
>>>         "ConstantScore(+allow_token_share:__nosecurity__ ..."
>>>         But the schema and the object browser show only
>>>         "allow_token_document"  and "deny_token_document" and that's
>>>         why I get no result. Right?
>>>
>>>         But I've added the definitions in the schema.xml.
>>>
>>>         I guess the two attributes were added automatically and I
>>>         have to investigate why Solr ignores my schema.xml.
>>>
>>>
>>>         Thank you for the tip
>>>         Frank
>>>
>>>
>>>
>>>         Am 06.03.2015 um 11:58 schrieb Paul Bieles:
>>>
>>>             Hi Frank,
>>>
>>>             Not sure its the same problem, but we had something
>>>             similar and it drove us mad!.
>>>
>>>             We hadn't included all of the access tokens when
>>>             indexing data. Ensure you have the following in your schema:
>>>
>>>             allow_token_parent
>>>             allow_token_document
>>>             allow_token_share
>>>             deny_token_parent
>>>             deny_token_document
>>>             deny_token_share
>>>
>>>             Paul
>>>
>>>             > Date: Fri, 6 Mar 2015 11:32:24 +0100
>>>             > From: frank.brendel@eurolog.com
>>>             <mailto:frank.brendel@eurolog.com>
>>>             > To: user@manifoldcf.apache.org
>>>             <mailto:user@manifoldcf.apache.org>
>>>             > Subject: No results from solr with mcf plugin
>>>             >
>>>             > Hi,
>>>             >
>>>             > I've successfully installed ManifoldCF 2.0.2 and Solr
>>>             5.0.0.
>>>             >
>>>             > Everything works fine but when I activate the
>>>             manifoldCFSecurity plugin
>>>             > I get no results from Solr.
>>>             >
>>>             >
>>>             > Without ManifoldCFSecurity plugin the Solr log shows
>>>             me two hits when I
>>>             > query 'Handbuch'.
>>>             >
>>>             > 2015-03-06 09:33:19.248;
>>>             org.apache.solr.core.SolrCore; [elcore]
>>>             > webapp=/solr path=/select
>>>             >
>>>             params={q=Handbuch&indent=true&wt=json&debugQuery=true&_=1425634399268}
>>>             > hits=2 status=0 QTime=5
>>>             >
>>>             >
>>>             > But with activated manifoldCFSecurity plugin I get no
>>>             hits.
>>>             >
>>>             > INFO - 2015-03-06 09:51:08.012;
>>>             org.apache.solr.core.SolrCore; [elcore]
>>>             > webapp=/solr path=/select
>>>             >
>>>             params={q=Handbuch&AuthenticatedUserName=user@domain&indent=true&wt=json&debugQuery=true&_=1425635468033}
>>>
>>>             > hits=0 status=0 QTime=7
>>>             > INFO - 2015-03-06 09:51:15.277;
>>>             > org.apache.solr.mcf.ManifoldCFSearchComponent; Trying
>>>             to match docs for
>>>             > user '[:user@domain]'
>>>             > INFO - 2015-03-06 09:51:15.281;
>>>             > org.apache.solr.mcf.ManifoldCFSearchComponent; Saw
>>>             authority response
>>>             > AUTHORIZED:ELAuthSPConn
>>>             >
>>>             >
>>>             > The response from the authorization service is
>>>             >
>>>             > # curl
>>>             >
>>>             'http://localhost:8345/mcf-authority-service/UserACLs?username=user@domain'
>>>             > AUTHORIZED:ELAuthSPConn
>>>             > TOKEN:ELAuthGroup:Ui%3A0%23.w%7Cdomain%5Cuser
>>>             > TOKEN:ELAuthGroup:GBesitzer+von+Abteilungen
>>>             > TOKEN:ELAuthGroup:GBesitzer+von+Kunden
>>>             > TOKEN:ELAuthGroup:GBesitzer+von+Produkte
>>>             > TOKEN:ELAuthGroup:GMitglieder+von+Abteilungen
>>>             >
>>>             >
>>>             > I also tried to query the allow_token_document
>>>             directly (without
>>>             > ManifoldCF plugin) and got exactly the single entry
>>>             that user@domain is
>>>             > allowed to see:
>>>             >
>>>             > INFO - 2015-03-06 09:56:39.909;
>>>             org.apache.solr.core.SolrCore; [elcore]
>>>             > webapp=/solr path=/select
>>>             >
>>>             params={q=allow_token_document:"ELAuthGroup:Ui%253A0%2523.w%257Cdomain%255Cuser"&indent=true&wt=json&_=1425635799838}
>>>
>>>             > hits=1 status=0 QTime=45
>>>             >
>>>             >
>>>             > I've tried it with the Query Parser and the Search
>>>             Component plugin with
>>>             > no success.
>>>             >
>>>             >
>>>             >
>>>             > Kind regards
>>>             > Frank
>>>             >
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>



Mime
View raw message