manifoldcf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: Authority problem: Help requested
Date Thu, 26 Apr 2012 10:01:11 GMT
I bet you are doing this on Linux.  The shell will interpret the &
character unless the arguments are quoted.  So what you really want
is:

curl "http://localhost:8983/solr/select?q=Netanyahu&AuthenticatedUserName=Fred"

This would be true of any url that had arguments.

Karl

On Thu, Apr 26, 2012 at 5:47 AM, Rene Nederhand <rene@nederhand.net> wrote:
> And to answer my own question:
>
> It seems that the curl query isn't doing what's it supposed to do.
>
> curl -d "q= Netanyahu&AuthenticatedUserName=Fred"
> http://localhost:8983/solr/select
>
> does work, but
>
> curl
> http://localhost:8983/solr/select?q=Netanyahu&AuthenticatedUserName=Fred
>
> doesn't. It will give me the complete index.
>
> If I put quotes on the query, it works as it is supposed to:
>
> curl
> http://localhost:8983/solr/select?"q=Netanyahu&AuthenticatedUserName=Fred"
>
> I hope this helps people save a lot of precious time. And perhaps, this
> should be changed in the book as well.
>
> René
>
>
> On Thu, Apr 26, 2012 at 11:06 AM, Rene Nederhand <rene@nederhand.net> wrote:
>>
>> Hi all,
>>
>> I am reading the book "Manifold in action" and trying to get all examples
>> running thereby learning how ManifoldCF works and what possibilities it has.
>> Unfortunately, I stumbled on a problem implementing authority. Can you help
>> me fixing this?
>>
>> ManifoldCF v0.5 and Solr 3.1 are up and running fine. As described in
>> chapter 4, I have defined a "secured RSS" repository, a Null authority, and
>> created an output connector to Solr and made two jobs: one for Fred and one
>> for George. I adapted the schema.xml and solrconfig.xml according to the
>> instructions (see links below).
>>
>> When I run both jobs, I see data being processed in Solr and access tokens
>> being added to Solr. A quick investigation with Luke shows that indeed the
>> index has two fields: allow_token_document and deny_token_document. So it
>> seems everything is all right.
>>
>> However, running:
>>
>>
>> curl http://localhost:8983/solr/select?q=Netanyahu&AuthenticatedUserName=George or
>> curl http://localhost:8983/solr/select?q=Netanyahu&AuthenticatedUserName=Fred
>>
>> gives me the same results. Even weirder: If I change the
>> AuthenticatedUserName to something completely different, I still get the
>> same result. It looks like the authority check does not work.
>>
>> Some output after querying with curl:
>> Apr 25, 2012 10:08:45 PM
>> org.apache.manifoldcf.examples.ManifoldCFSecurityFilter prepare
>> INFO: prepare() entry params:
>> {params(q=Netanyahu),defaults(df=text&echoParams=explicit&rows=10)}
>> context: {webapp=/solr, path=/select}
>> Apr 25, 2012 10:08:45 PM
>> org.apache.manifoldcf.examples.ManifoldCFSecurityFilter process
>> INFO: ManifoldCFSecurityFilter: process() called
>> Apr 25, 2012 10:08:45 PM org.apache.solr.core.SolrCore execute
>> INFO: [] webapp=/solr path=/select params={q=Netanyahu} hits=1 status=0
>> QTime=2
>>
>> From this, I conclude that authority-example.jar (in example/solr/lib) is
>> being processed.
>>
>> I've attached links to my solrconfig, schema and the jar file. What am I
>> doing wrong?
>>
>> Thanks in advance.
>>
>> René
>>
>> My solrconfig.xml file
>> http://dl.dropbox.com/u/176114/solrconfig.xml
>>
>> My schema.xml file
>> http://dl.dropbox.com/u/176114/schema.xml
>>
>> The authority example jar (to be copied in example/solr/lib:
>> http://dl.dropbox.com/u/176114/authority-example.jar
>
>

Mime
View raw message