Re: Show the score in the search result

2014-04-17 Thread Stefan Matheis
The wiki contains an explanation for that as well :)

http://wiki.apache.org/solr/CommonQueryParameters#fl

It includes all fields the document actually has. and since there is no 'score' 
field included in your document, it won't get displayed. it's a so called 
virtual-field, which you have to request explicitly.

-Stefan 


On Thursday, April 17, 2014 at 11:09 AM, Croci Francesco Luigi (ID SWS) wrote:

> I think you mean this row:
> 
> * ,fullText: ...
> 
> Ok, but what I understood is that the "*" means that ALL the fields are 
> displayed anyway. Or not?
> 
> Francesco
> 
> -Original Message-
> From: Stefan Matheis [mailto:matheis.ste...@gmail.com] 
> Sent: Donnerstag, 17. April 2014 10:04
> To: solr-user@lucene.apache.org (mailto:solr-user@lucene.apache.org)
> Subject: Re: Show the score in the search result
> 
> That's exactly what Jack mentioned, you're defining an invariant for fl, 
> which ignores everything you provide at runtime. 
> 
> From http://wiki.apache.org/solr/SearchHandler#Configuration
> 
> "invariants - provides param values that will be used in spite of any values 
> provided at request time. They are a way of letting the Solr maintainer lock 
> down the options available to Solr clients."
> 
> -Stefan 



RE: Show the score in the search result

2014-04-17 Thread Croci Francesco Luigi (ID SWS)
I think you mean this row:

* ,fullText: ...

Ok, but what I understood is that the "*" means that ALL the fields are 
displayed anyway. Or not?

Francesco

-Original Message-
From: Stefan Matheis [mailto:matheis.ste...@gmail.com] 
Sent: Donnerstag, 17. April 2014 10:04
To: solr-user@lucene.apache.org
Subject: Re: Show the score in the search result

That's exactly what Jack mentioned, you're defining an invariant for fl, which 
ignores everything you provide at runtime.  

From http://wiki.apache.org/solr/SearchHandler#Configuration

"invariants - provides param values that will be used in spite of any values 
provided at request time. They are a way of letting the Solr maintainer lock 
down the options available to Solr clients."

-Stefan  





Re: Show the score in the search result

2014-04-17 Thread Stefan Matheis
That's exactly what Jack mentioned, you're defining an invariant for fl, which 
ignores everything you provide at runtime.  

From http://wiki.apache.org/solr/SearchHandler#Configuration

"invariants - provides param values that will be used in spite of any values 
provided at request time. They are a way of letting the Solr maintainer lock 
down the options available to Solr clients."

-Stefan  


On Thursday, April 17, 2014 at 9:38 AM, Croci Francesco Luigi (ID SWS) wrote:

> Hello Chris:
>  
> trying to execute 
> http://localhost:7001/solr/collection1/select?q=*%3A*&rows=1&fl=score&wt=json&indent=true&echoParams=true
>  
> I get  
>  
> {
> "error": {
> "msg": "Invalid value 'true' for echoParams parameter, use 'EXPLICIT' or 
> 'ALL'",
> "code": 400
> }
> }
>  
> With echoParams=ALL:
>  
> {
> "responseHeader": {
> "status": 0,
> "QTime": 0,
> "params": {
> "defType": "edismax",
> "echoParams": "ALL",
> "fl": "*,fullText:fullText",
> "indent": "true",
> "q": "*:*",
> "_": "1397719590902",
> "wt": "json",
> "rows": "1",
> "uf": "* -fullText_*",
> "f.all.qf": "rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass 
> rmDocumentCatName rmDocumentCatNameEn fullText",
> "fq": "* -language:en -language:de"
> }
> },
> "response": {
> "numFound": 842,
> "start": 0,
> "docs": [
> {
> "rmDocumentTitle": [
> "Ersterfassung"
> ],
> "rmDocumentClass": [
> "Einführung Records Management"
> ],
> "rmDocumentSubclass": [
> "Einführung Records Management"
> ],
> "id": "aabziwlc4hkvgojtzyb4wbebqr4m3",
> "rmDocumentArt": [
> "Ersterfassung"
> ],
> "fullText": [
> " \n \n \n \n \n \n \n \n "
> ],
> "signatureField": "d41d8cd98f00b204e9800998ecf8427e"
> }
> ]
> }
> }
>  
> I adapted the sample on "Instant Apache Solr for Indexing Data How-to" 
> Chapter: Indexing multiple languages(advanced)
>  
>  
> here is the schema:
>  
> 
> 
> 
> 
> 
> 
> 
> 
>  
>  
>  
>  ignoreCase="true"/> 
> 
> 
> 
> 
> 
> 
>  ignoreCase="true"/>
> 
> 
> 
> 
> 
> 
> 
>  positionIncrementGap="100" autoGeneratePhraseQueries="true">
> 
> 
>  
>  
>  
>  ignoreCase="true"/> 
> 
> 
> 
> 
> 
> 
>  ignoreCase="true"/>
> 
> 
> 
> 
> 
> 
>  positionIncrementGap="100">
> 
> 
>  
>  
>  
>  ignoreCase="true" format="snowball" enablePositionIncrements="true"/> 
> 
> 
> 
> 
> 
> 
>  ignoreCase="true"/>
> 
> 
> 
> 
> 
> 
> 
>  
> 
>  multiValued="false" />
> 
>  indexed="false" stored="false" />
> 
> 
>  multiValued="false" />
>  multiValued="true"/>
>  multiValued="true"/>
>  multiValued="true"/>
>  multiValued="true"/>
>  multiValued="true"/>
>  multiValued="true"/>
> 
> 
>  
> fullText
>  
> 
> id
> 
>  
>  
>  
> Here the solrconfig:
>  
> 
> 
> LUCENE_45
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  
>  default="true" />
>  
>  class="org.apache.solr.handler.admin.LukeRequestHandler" />
>  
> 
> 
> deduplication
> 
> 
>  
>  class="solr.extraction.ExtractingRequestHandler">
> 
> true
> false
> false
> true
> true
> ignored_
> link
> fullText
> 
> deduplication
> 
> 
>  
> 
>  class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
> false
> signatureField
> true
> content
> 10
> .2
> solr.update.processor.TextProfileSignature
> 
> 
> 
>  
> 
> 
> fullText
> en,de
> en
> language
> true
> false
> 
> 
> 
> 
>  
> 
> 
> edismax
> 
> 
> * -language:en -language:de
> rmDocumentTitle rmDocumentArt rmDocumentClass 
> rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText
> * -fullText_*
> *,fullText:fullText
> 
> 
>  
> 
> 
> edismax
> fullText_en
> full_Text
> json
> true
> 
> 
> language:en
> fullText_en
> rmDocumentTitle rmDocumentArt rmDocumentClass 
> rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_en
> * -fullText_*
> *,fullText:fullText_en
> 
> 
>  
> 
> 
> edismax
> fullText_de
> full_Text
> json
> true
> 
> 
> language:de
> fullText_de
> rmDocumentTitle rmDocumentArt rmDocumentClass 
> rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_de
> * -fullText_*
> *,fullText:fullText_de
> 
> 
>  
>  class="org.apache.solr.handler.admin.AdminHandlers" />
>  
> none
>  
> 
> *:*
> 
>  
> 
>  
>  
> Hope this will help.
>  
> Francesco
>  
> -Original Message-
> From: Chris Hostetter [mailto:hossman_luc...@fucit.org]  
> Sent: Mittwoch, 16. April 2014 19:09
> To: solr-user@lucene.apache.org (mailto:solr-user@lucene.apache.org)
> Subject: RE: Show the score in the search result
>  
>  
> : here is the query:
> : 
> http://localhost:7001/solr/collection1/select?q=*%3A*&rows=5&fl=*%2Cscore&wt=json&indent=true&debugQuery=true
> :  
> :  
> : and here the response:
>  
> that's bizare.
>  
> Do me a favor, and:
>  
> * post the results of 
> .../select?q=*%3A*&rows=1&fl=score&wt=json&indent=true&echoParams=true
> * show us your schema.xml
> * show us your solrconfig.xml
>  
>  
>  
> -Hoss
> http://www.lucidworks.com/
>  
>  




RE: Show the score in the search result

2014-04-17 Thread Croci Francesco Luigi (ID SWS)
.2
solr.update.processor.TextProfileSignature




  

fullText
en,de
en
language
true
false

  
  




edismax


* -language:en -language:de
rmDocumentTitle rmDocumentArt 
rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn 
fullText
* -fullText_*
*,fullText:fullText




  
edismax
fullText_en
full_Text
json
true
  
  
language:en
fullText_en
rmDocumentTitle rmDocumentArt 
rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn 
fullText_en
* -fullText_*
*,fullText:fullText_en
  



  
edismax
fullText_de
full_Text
json
true
  
  
language:de
fullText_de
                rmDocumentTitle rmDocumentArt 
rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn 
fullText_de
* -fullText_*
*,fullText:fullText_de
  




none


*:*





Hope this will help.

Francesco

-Original Message-
From: Chris Hostetter [mailto:hossman_luc...@fucit.org] 
Sent: Mittwoch, 16. April 2014 19:09
To: solr-user@lucene.apache.org
Subject: RE: Show the score in the search result


: here is the query:
: 
http://localhost:7001/solr/collection1/select?q=*%3A*&rows=5&fl=*%2Cscore&wt=json&indent=true&debugQuery=true
: 
: 
: and here the response:

that's bizare.

Do me a favor, and:

 * post the results of 
.../select?q=*%3A*&rows=1&fl=score&wt=json&indent=true&echoParams=true
 * show us your schema.xml
 * show us your solrconfig.xml



-Hoss
http://www.lucidworks.com/


Re: Show the score in the search result

2014-04-16 Thread Jack Krupansky

And try it with wt=xml ... maybe there's something odd with JSON.

And also with echoParams=all so we can be sure what's really passed.

I suppose if you had an "invariant" for "fl", then fl would be ignored, 
but... that would be a less likely scenario.


-- Jack Krupansky

-Original Message- 
From: Chris Hostetter

Sent: Wednesday, April 16, 2014 1:08 PM
To: solr-user@lucene.apache.org
Subject: RE: Show the score in the search result


: here is the query:
: 
http://localhost:7001/solr/collection1/select?q=*%3A*&rows=5&fl=*%2Cscore&wt=json&indent=true&debugQuery=true

:
:
: and here the response:

that's bizare.

Do me a favor, and:

* post the results of 
.../select?q=*%3A*&rows=1&fl=score&wt=json&indent=true&echoParams=true

* show us your schema.xml
* show us your solrconfig.xml



-Hoss
http://www.lucidworks.com/ 



RE: Show the score in the search result

2014-04-16 Thread Chris Hostetter

: here is the query:
: 
http://localhost:7001/solr/collection1/select?q=*%3A*&rows=5&fl=*%2Cscore&wt=json&indent=true&debugQuery=true
: 
: 
: and here the response:

that's bizare.

Do me a favor, and:

 * post the results of 
.../select?q=*%3A*&rows=1&fl=score&wt=json&indent=true&echoParams=true
 * show us your schema.xml
 * show us your solrconfig.xml



-Hoss
http://www.lucidworks.com/


RE: Show the score in the search result

2014-04-16 Thread Croci Francesco Luigi (ID SWS)
Hello Jack,

I know it's not the best example, but I just wanted to see the score field 
"printed out"... :)

Francesco

-Original Message-
From: Jack Krupansky [mailto:j...@basetechnology.com] 
Sent: Mittwoch, 16. April 2014 14:32
To: solr-user@lucene.apache.org
Subject: Re: Show the score in the search result

Also, "*:*" is a constant score query, so the score will always be 1.0. Not a 
terribly good example to request the score.

Please provide the Solr query response, with the debug=true parameter so we can 
see for ourselves that no score is returned.

-- Jack Krupansky

-Original Message-
From: Erick Erickson
Sent: Wednesday, April 16, 2014 8:00 AM
To: solr-user@lucene.apache.org
Subject: Re: Show the score in the search result

What version of Solr? Works fine for me.

Best,
Erick

On Wed, Apr 16, 2014 at 6:38 AM, Croci  Francesco Luigi (ID SWS) 
 wrote:
> I read that if I add the string "score" in the fl field, I should be 
> able to see the score within the retuned documents.
>
> As I understand "score" is a "special/reserved" word and I don't have 
> to define in the schema (right)?
>
> I did so, but in the returned fields' list I see no score field...
>
> Here is the request's URL: 
> http://localhost:7001/solr/collection1/select?q=*%3A*&fl=*%2Cscore&wt=
> json&indent=true
>
> Do I miss something?
>
> Francesco



RE: Show the score in the search result

2014-04-16 Thread Croci Francesco Luigi (ID SWS)
Hello Jack,

here is the query:
http://localhost:7001/solr/collection1/select?q=*%3A*&rows=5&fl=*%2Cscore&wt=json&indent=true&debugQuery=true


and here the response:

{
  "responseHeader": {
"status": 0,
"QTime": 0
  },
  "response": {
"numFound": 842,
"start": 0,
"docs": [
  {
"rmDocumentTitle": [
  "Ersterfassung"
],
"rmDocumentClass": [
  "Einführung Records Management"
],
"rmDocumentSubclass": [
  "Einführung Records Management"
],
"id": "aabziwlc4hkvgojtzyb4wbebqr4m3",
"rmDocumentArt": [
  "Ersterfassung"
],
"fullText": [
  " \n \n  \n  \n  \n  \n  \n \n "
],
"signatureField": "d41d8cd98f00b204e9800998ecf8427e"
  },
  {
"rmDocumentTitle": [
  "pdf problem"
],
"rmDocumentClass": [
  "Finanzielle Unterstützung"
],
"rmDocumentSubclass": [
  "Finanzielle Unterstützung"
],
"id": "aabn2s6tgozfgojtzyaxhmebqr4m3",
"rmDocumentArt": [
  "Finanzielle Unterstützung: Soziales"
],
"fullText": [
  " \n \n  \n  \n  \n  \n  \n \n "
],
"signatureField": "d41d8cd98f00b204e9800998ecf8427e"
  },
  {
"rmDocumentTitle": [
  "Outgoing Diverses"
],
"rmDocumentClass": [
  "Mobilität Outgoing"
],
"rmDocumentSubclass": [
  "Mobilität Outgoing"
],
"id": "aaaerfrlvzafgjxaticq2sebqr4m3",
"rmDocumentArt": [
  "Outgoing Diverses"
],
"fullText": [
  " \n \n  \n  \n  \n  \n  \n \n "
],
"signatureField": "d41d8cd98f00b204e9800998ecf8427e"
  },
  {
"rmDocumentTitle": [
  "Outgoing Diverses"
],
"rmDocumentClass": [
  "Mobilität Outgoing"
],
"rmDocumentSubclass": [
  "Mobilität Outgoing"
],
"id": "aaaeysqdibkvgjxaticq3b3bqr4m3",
"rmDocumentArt": [
  "Outgoing Diverses"
],
"fullText": [
  " \n \n  \n  \n  \n  \n  \n \n "
],
"signatureField": "d41d8cd98f00b204e9800998ecf8427e"
  },
  {
"rmDocumentTitle": [
  "Outgoing Diverses"
],
"rmDocumentClass": [
  "Mobilität Outgoing"
],
"rmDocumentSubclass": [
  "Mobilität Outgoing"
],
"id": "aaafhbovq6ufgjxaticq4ombqr4m3",
"rmDocumentArt": [
  "Outgoing Diverses"
],
"fullText": [
  " \n \n  \n  \n  \n  \n  \n \n "
],
"signatureField": "d41d8cd98f00b204e9800998ecf8427e"
  }
]
  },
  "debug": {
"rawquerystring": "*:*",
"querystring": "*:*",
"parsedquery": "(+MatchAllDocsQuery(*:*))/no_coord",
"parsedquery_toString": "+*:*",
"explain": {
  "aabziwlc4hkvgojtzyb4wbebqr4m3": "\n1.0 = (MATCH) MatchAllDocsQuery, 
product of:\n  1.0 = queryNorm\n",
  "aabn2s6tgozfgojtzyaxhmebqr4m3": "\n1.0 = (MATCH) MatchAllDocsQuery, 
product of:\n  1.0 = queryNorm\n",
  "aaaerfrlvzafgjxaticq2sebqr4m3": "\n1.0 = (MATCH) MatchAllDocsQuery, 
product of:\n  1.0 = queryNorm\n",
  "aaaeysqdibkvgjxaticq3b3bqr4m3": "\n1.0 = (MATCH) MatchAllDocsQuery, 
product of:\n  1.0 = queryNorm\n",
  "aaafhbovq6ufgjxaticq4ombqr4m3": "\n1.0 = (MATCH) MatchAllDocsQuery, 
product of:\n  1.0 = queryNorm\n"
},
"QParser": "ExtendedDismaxQParser",
"altquerystring": null,
"boost_queries": null,
"parsed_boost_queries": [],
"boostfuncs": null,
"filter_queries": [
      "* -language:en -language:de"
],
"parsed_filter_queries": [
  "MatchAllDocsQuery(*:*) -language:en -language:de"
],
"timing": {
  "time"

RE: Show the score in the search result

2014-04-16 Thread Croci Francesco Luigi (ID SWS)
Hello Erik,

Solr 4.7.1

Francesco

-Original Message-
From: Erick Erickson [mailto:erickerick...@gmail.com] 
Sent: Mittwoch, 16. April 2014 14:01
To: solr-user@lucene.apache.org
Subject: Re: Show the score in the search result

What version of Solr? Works fine for me.

Best,
Erick

On Wed, Apr 16, 2014 at 6:38 AM, Croci  Francesco Luigi (ID SWS) 
 wrote:
> I read that if I add the string "score" in the fl field, I should be able to 
> see the score within the retuned documents.
>
> As I understand "score" is a "special/reserved" word and I don't have to 
> define in the schema (right)?
>
> I did so, but in the returned fields' list I see no score field...
>
> Here is the request's URL: 
> http://localhost:7001/solr/collection1/select?q=*%3A*&fl=*%2Cscore&wt=
> json&indent=true
>
> Do I miss something?
>
> Francesco


Re: Show the score in the search result

2014-04-16 Thread Jack Krupansky
Also, "*:*" is a constant score query, so the score will always be 1.0. Not 
a terribly good example to request the score.


Please provide the Solr query response, with the debug=true parameter so we 
can see for ourselves that no score is returned.


-- Jack Krupansky

-Original Message- 
From: Erick Erickson

Sent: Wednesday, April 16, 2014 8:00 AM
To: solr-user@lucene.apache.org
Subject: Re: Show the score in the search result

What version of Solr? Works fine for me.

Best,
Erick

On Wed, Apr 16, 2014 at 6:38 AM, Croci  Francesco Luigi (ID SWS)
 wrote:
I read that if I add the string "score" in the fl field, I should be able 
to see the score within the retuned documents.


As I understand "score" is a "special/reserved" word and I don't have to 
define in the schema (right)?


I did so, but in the returned fields' list I see no score field...

Here is the request's URL: 
http://localhost:7001/solr/collection1/select?q=*%3A*&fl=*%2Cscore&wt=json&indent=true


Do I miss something?

Francesco 




Re: Show the score in the search result

2014-04-16 Thread Erick Erickson
What version of Solr? Works fine for me.

Best,
Erick

On Wed, Apr 16, 2014 at 6:38 AM, Croci  Francesco Luigi (ID SWS)
 wrote:
> I read that if I add the string "score" in the fl field, I should be able to 
> see the score within the retuned documents.
>
> As I understand "score" is a "special/reserved" word and I don't have to 
> define in the schema (right)?
>
> I did so, but in the returned fields' list I see no score field...
>
> Here is the request's URL: 
> http://localhost:7001/solr/collection1/select?q=*%3A*&fl=*%2Cscore&wt=json&indent=true
>
> Do I miss something?
>
> Francesco


Show the score in the search result

2014-04-16 Thread Croci Francesco Luigi (ID SWS)
I read that if I add the string "score" in the fl field, I should be able to 
see the score within the retuned documents.

As I understand "score" is a "special/reserved" word and I don't have to define 
in the schema (right)?

I did so, but in the returned fields' list I see no score field...

Here is the request's URL: 
http://localhost:7001/solr/collection1/select?q=*%3A*&fl=*%2Cscore&wt=json&indent=true

Do I miss something?

Francesco