You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch> on 2014/04/16 12:38:40 UTC

Show the score in the search result

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

Posted by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch>.
Hello Erik,

Solr 4.7.1

Francesco

-----Original Message-----
From: Erick Erickson [mailto:erickerickson@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) <fc...@id.ethz.ch> 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

Posted by Jack Krupansky <ja...@basetechnology.com>.
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

Posted by Stefan Matheis <ma...@gmail.com>.
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:
> 
> <str name="fl">* ,fullText: ...</str>
> 
> 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.stefan@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

Posted by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch>.
I think you mean this row:

<str name="fl">* ,fullText: ...</str>

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.stefan@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

Posted by Stefan Matheis <ma...@gmail.com>.
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:
>  
> <?xml version="1.0" encoding="UTF-8" ?>
> <schema name="simple" version="1.1">
> <types>
> <fieldtype name="string" class="solr.StrField" postingsFormat="SimpleText" />
> <fieldtype name="ignored" class="solr.TextField" />
> <fieldtype name="text" class="solr.TextField" postingsFormat="SimpleText">
> <analyzer type="index">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <!--<filter class="solr.ASCIIFoldingFilterFactory"/>--> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
> <filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
> <filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
> <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> <!--Discards common words. -->
> <filter class="solr.PorterStemFilterFactory"/>
> <filter class="solr.SnowballPorterFilterFactory" language="German2" />
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> <analyzer type="query">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
> <filter class="solr.LowerCaseFilterFactory" />
> <filter class="solr.TrimFilterFactory"/>
> <filter class="solr.PorterStemFilterFactory"/>
> <filter class="solr.SnowballPorterFilterFactory" language="German2" />
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> </fieldtype>
> <fieldtype name="text_en" class="solr.TextField" postingsFormat="SimpleText" positionIncrementGap="100" autoGeneratePhraseQueries="true">
> <analyzer type="index">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.ASCIIFoldingFilterFactory"/> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
> <filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
> <filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
> <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/> <!--Discards common words. -->
> <filter class="solr.EnglishPossessiveFilterFactory"/>
> <filter class="solr.PorterStemFilterFactory"/>
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> <analyzer type="query">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
> <filter class="solr.LowerCaseFilterFactory" />
> <filter class="solr.TrimFilterFactory"/>
> <filter class="solr.PorterStemFilterFactory"/>
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> </fieldtype>
> <fieldtype name="text_de" class="solr.TextField" postingsFormat="SimpleText" positionIncrementGap="100">
> <analyzer type="index">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.ASCIIFoldingFilterFactory"/> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
> <filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
> <filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
> <filter class="solr.StopFilterFactory" words="lang/stopwords_de.txt" ignoreCase="true" format="snowball" enablePositionIncrements="true"/> <!--Discards common words. -->
> <filter class="solr.SnowballPorterFilterFactory" language="German2" />
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> <analyzer type="query">
> <tokenizer class="solr.StandardTokenizerFactory"/>
> <filter class="solr.StopFilterFactory" words="lang/stopwords_de.txt" ignoreCase="true"/>
> <filter class="solr.LowerCaseFilterFactory" />
> <filter class="solr.TrimFilterFactory"/>
> <filter class="solr.SnowballPorterFilterFactory" language="German2" />
> <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
> </analyzer>
> </fieldtype>
> </types>
>  
> <fields>
> <field name="signatureField" type="string" indexed="true" stored="true" multiValued="false" />
> <field name="language" type="string" stored="true" indexed="true" />
> <dynamicField name="ignored_*" type="ignored" multiValued="true" indexed="false" stored="false" />
> <dynamicField name="*_en" type="text_en" stored="true" indexed="true" />
> <dynamicField name="*_de" type="text_de" stored="true" indexed="true" />
> <field name="id" type="string" indexed="true" stored="true" multiValued="false" />
> <field name="rmDocumentTitle" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="rmDocumentArt" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="rmDocumentClass" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="rmDocumentSubclass" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="rmDocumentCatName" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="rmDocumentCatNameEn" type="string" indexed="true" stored="true" multiValued="true"/>
> <field name="fullText" indexed="true" type="text" multiValued="true" />
> </fields>
>  
> <defaultSearchField>fullText</defaultSearchField>
>  
> <solrQueryParser defaultOperator="OR" />
> <uniqueKey>id</uniqueKey>
> </schema>
>  
>  
>  
> Here the solrconfig:
>  
> <?xml version="1.0" encoding="UTF-8" ?>
> <config>
> <luceneMatchVersion>LUCENE_45</luceneMatchVersion>
> <directoryFactory name='DirectoryFactory' class='solr.MMapDirectoryFactory' />
>  
> <codecFactory name="CodecFactory" class="solr.SchemaCodecFactory" />
>  
> <lib dir='${solr.core.instanceDir}\lib' />
> <lib dir="${solr.core.instanceDir}\dist\" regex="solr-cell-\d.*\.jar" />
> <lib dir="${solr.core.instanceDir}\contrib\extraction\lib" regex=".*\.jar" />
> <lib dir="${solr.core.instanceDir}\dist\" regex="solr-langid-.*\.jar" />
> <lib dir="${solr.core.instanceDir}\contrib\langid\lib\" />
>  
> <requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
>  
> <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
>  
> <requestHandler name="/update" class="solr.UpdateRequestHandler">
> <lst name="defaults">
> <str name="update.chain">deduplication</str>
> </lst>
> </requestHandler>
>  
> <requestHandler name="/update/extract" class="solr.extraction.ExtractingRequestHandler">
> <lst name="defaults">
> <str name="captureAttr">true</str>
> <str name="lowernames">false</str>
> <str name="overwrite">false</str>
> <str name="captureAttr">true</str>
> <str name="literalsOverride">true</str>
> <str name="uprefix">ignored_</str>
> <str name="fmap.a">link</str>
> <str name="fmap.content">fullText</str>
> <!-- the configuration here could be useful for tests -->
> <str name="update.chain">deduplication</str>
> </lst>
> </requestHandler>
>  
> <updateRequestProcessorChain name="deduplication">
> <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
> <bool name="overwriteDupes">false</bool>
> <str name="signatureField">signatureField</str>
> <bool name="enabled">true</bool>
> <str name="fields">content</str>
> <str name="minTokenLen">10</str>
> <str name="quantRate">.2</str>
> <str name="signatureClass">solr.update.processor.TextProfileSignature</str>
> </processor>
> <processor class="solr.LogUpdateProcessorFactory" />
> <processor class="solr.RunUpdateProcessorFactory" />
>  
> <processor class="solr.LangDetectLanguageIdentifierUpdateProcessorFactory">
> <lst name="invariants">
> <str name="langid.fl">fullText</str>
> <str name="langid.whitelist">en,de</str>
> <str name="langid.fallback">en</str>
> <str name="langid.langField">language</str>
> <bool name="langid.map">true</bool>
> <bool name="langid.map.keepOrig">false</bool>
> </lst>
> </processor>
> <processor class="solr.RunUpdateProcessorFactory" />
> </updateRequestProcessorChain>
>  
> <requestHandler name="/select" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="defType">edismax</str>
> </lst>
> <lst name="invariants">
> <str name="fq">* -language:en -language:de</str>
> <str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText</str>
> <str name="uf">* -fullText_*</str>
> <str name="fl">*,fullText:fullText</str>
> </lst>
> </requestHandler>
>  
> <requestHandler name="/selectEN" class="solr.SearchHandler" >
> <lst name="defaults">
> <str name="defType">edismax</str>
> <str name="qf">fullText_en</str>
> <str name="df">full_Text</str>
> <str name="wt">json</str>
> <str name="indent">true</str>
> </lst>
> <lst name="invariants">
> <str name="fq">language:en</str>
> <str name="f.fullText.qf">fullText_en</str>
> <str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_en</str>
> <str name="uf">* -fullText_*</str>
> <str name="fl">*,fullText:fullText_en</str>
> </lst>
> </requestHandler>
>  
> <requestHandler name="/selectDE" class="solr.SearchHandler" >
> <lst name="defaults">
> <str name="defType">edismax</str>
> <str name="qf">fullText_de</str>
> <str name="df">full_Text</str>
> <str name="wt">json</str>
> <str name="indent">true</str>
> </lst>
> <lst name="invariants">
> <str name="fq">language:de</str>
> <str name="f.fullText.qf">fullText_de</str>
> <str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_de</str>
> <str name="uf">* -fullText_*</str>
> <str name="fl">*,fullText:fullText_de</str>
> </lst>
> </requestHandler>
>  
> <requestHandler name="/admin/"
> class="org.apache.solr.handler.admin.AdminHandlers" />
>  
> <lockType>none</lockType>
>  
> <admin>
> <defaultQuery>*:*</defaultQuery>
> </admin>
>  
> </config>
>  
>  
> Hope this will help.
>  
> Francesco
>  
> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_lucene@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

Posted by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch>.
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:

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="simple" version="1.1">
	<types>
		<fieldtype name="string" class="solr.StrField" postingsFormat="SimpleText" />
		<fieldtype name="ignored" class="solr.TextField" />
		<fieldtype name="text" class="solr.TextField" postingsFormat="SimpleText">
			<analyzer type="index">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<!--<filter class="solr.ASCIIFoldingFilterFactory"/>--> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
				<filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
				<filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
				<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> <!--Discards common words.  -->
				<filter class="solr.PorterStemFilterFactory"/>
				<filter class="solr.SnowballPorterFilterFactory" language="German2" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
			<analyzer type="query">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.TrimFilterFactory"/>
				<filter class="solr.PorterStemFilterFactory"/>
				<filter class="solr.SnowballPorterFilterFactory" language="German2" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
		</fieldtype>
		<fieldtype name="text_en" class="solr.TextField" postingsFormat="SimpleText" positionIncrementGap="100" autoGeneratePhraseQueries="true">
			<analyzer type="index">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<filter class="solr.ASCIIFoldingFilterFactory"/> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
				<filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
				<filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
				<filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/> <!--Discards common words.  -->
				<filter class="solr.EnglishPossessiveFilterFactory"/>
				<filter class="solr.PorterStemFilterFactory"/>
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
			<analyzer type="query">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="true"/>
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.TrimFilterFactory"/>
				<filter class="solr.PorterStemFilterFactory"/>
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
		</fieldtype>
		<fieldtype name="text_de" class="solr.TextField" postingsFormat="SimpleText" positionIncrementGap="100">
			<analyzer type="index">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<filter class="solr.ASCIIFoldingFilterFactory"/> <!--Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters into their ASCII equivalents, if one exists. -->
				<filter class="solr.LowerCaseFilterFactory" /> <!--Lowercases the letters in each token. Leaves non-letter tokens alone.-->
				<filter class="solr.TrimFilterFactory"/> <!--Trims whitespace at either end of a token. -->
				<filter class="solr.StopFilterFactory" words="lang/stopwords_de.txt" ignoreCase="true" format="snowball" enablePositionIncrements="true"/> <!--Discards common words.  -->
				<filter class="solr.SnowballPorterFilterFactory" language="German2" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
			<analyzer type="query">
				<tokenizer class="solr.StandardTokenizerFactory"/>
				<filter class="solr.StopFilterFactory" words="lang/stopwords_de.txt" ignoreCase="true"/>
				<filter class="solr.LowerCaseFilterFactory" />
				<filter class="solr.TrimFilterFactory"/>
				<filter class="solr.SnowballPorterFilterFactory" language="German2" />
				<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
			</analyzer>
		</fieldtype>
	</types>

	<fields>
		<field name="signatureField" type="string" indexed="true" stored="true" multiValued="false" />
		<field name="language" type="string" stored="true" indexed="true" />
		<dynamicField name="ignored_*" type="ignored" multiValued="true" indexed="false" stored="false" />
		<dynamicField name="*_en" type="text_en" stored="true" indexed="true" />
		<dynamicField name="*_de" type="text_de" stored="true" indexed="true" />
		<field name="id" type="string" indexed="true" stored="true" multiValued="false" />
		<field name="rmDocumentTitle" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="rmDocumentArt" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="rmDocumentClass" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="rmDocumentSubclass" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="rmDocumentCatName" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="rmDocumentCatNameEn" type="string" indexed="true" stored="true" multiValued="true"/>
		<field name="fullText" indexed="true" type="text" multiValued="true" />
	</fields>

	<defaultSearchField>fullText</defaultSearchField>

	<solrQueryParser defaultOperator="OR" />
	<uniqueKey>id</uniqueKey>
</schema>



Here the solrconfig:

<?xml version="1.0" encoding="UTF-8" ?>
<config>
	<luceneMatchVersion>LUCENE_45</luceneMatchVersion>
	<directoryFactory name='DirectoryFactory' class='solr.MMapDirectoryFactory' />

	<codecFactory name="CodecFactory" class="solr.SchemaCodecFactory" />

	<lib dir='${solr.core.instanceDir}\lib' />
	<lib dir="${solr.core.instanceDir}\dist\" regex="solr-cell-\d.*\.jar" />
	<lib dir="${solr.core.instanceDir}\contrib\extraction\lib" regex=".*\.jar" />
	<lib dir="${solr.core.instanceDir}\dist\" regex="solr-langid-.*\.jar" />
	<lib dir="${solr.core.instanceDir}\contrib\langid\lib\" />

	<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
	
	<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />

	<requestHandler name="/update" class="solr.UpdateRequestHandler">
		<lst name="defaults">
			<str name="update.chain">deduplication</str>
		</lst>
	</requestHandler>

	<requestHandler name="/update/extract" class="solr.extraction.ExtractingRequestHandler">
		<lst name="defaults">
			<str name="captureAttr">true</str>
			<str name="lowernames">false</str>
			<str name="overwrite">false</str>
			<str name="captureAttr">true</str>
			<str name="literalsOverride">true</str>
			<str name="uprefix">ignored_</str>
			<str name="fmap.a">link</str>
			<str name="fmap.content">fullText</str>
			<!-- the configuration here could be useful for tests -->
			<str name="update.chain">deduplication</str>
		</lst>
	</requestHandler>

	<updateRequestProcessorChain name="deduplication">
		<processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
			<bool name="overwriteDupes">false</bool>
			<str name="signatureField">signatureField</str>
			<bool name="enabled">true</bool>
			<str name="fields">content</str>
			<str name="minTokenLen">10</str>
			<str name="quantRate">.2</str>
			<str name="signatureClass">solr.update.processor.TextProfileSignature</str>
		</processor>
		<processor class="solr.LogUpdateProcessorFactory" />
		<processor class="solr.RunUpdateProcessorFactory" />
	
	  <processor class="solr.LangDetectLanguageIdentifierUpdateProcessorFactory">
		<lst name="invariants">
			<str name="langid.fl">fullText</str>
			<str name="langid.whitelist">en,de</str>
			<str name="langid.fallback">en</str>
			<str name="langid.langField">language</str>
			<bool name="langid.map">true</bool>
			<bool name="langid.map.keepOrig">false</bool>
		</lst>
	  </processor>
	  <processor class="solr.RunUpdateProcessorFactory" />
	</updateRequestProcessorChain>
	
	<requestHandler name="/select" class="solr.SearchHandler">
		<lst name="defaults">
			<str name="defType">edismax</str>
		</lst>
		<lst name="invariants">
			<str name="fq">* -language:en -language:de</str>
			<str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText</str>
			<str name="uf">* -fullText_*</str>
			<str name="fl">*,fullText:fullText</str>
		</lst>
	</requestHandler>
	
	<requestHandler name="/selectEN" class="solr.SearchHandler" >
	  <lst name="defaults">
			<str name="defType">edismax</str>
			<str name="qf">fullText_en</str>
			<str name="df">full_Text</str>
			<str name="wt">json</str>
			<str name="indent">true</str>
	  </lst>
	  <lst name="invariants">
			<str name="fq">language:en</str>
			<str name="f.fullText.qf">fullText_en</str>
			<str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_en</str>
			<str name="uf">* -fullText_*</str>
			<str name="fl">*,fullText:fullText_en</str>
	  </lst>
	</requestHandler>
	
	<requestHandler name="/selectDE" class="solr.SearchHandler" >
	  <lst name="defaults">
			<str name="defType">edismax</str>
			<str name="qf">fullText_de</str>
			<str name="df">full_Text</str>
			<str name="wt">json</str>
			<str name="indent">true</str>
	  </lst>
	  <lst name="invariants">
			<str name="fq">language:de</str>
			<str name="f.fullText.qf">fullText_de</str>
			<str name="f.all.qf">rmDocumentTitle rmDocumentArt rmDocumentClass rmDocumentSubclass rmDocumentCatName rmDocumentCatNameEn fullText_de</str>
			<str name="uf">* -fullText_*</str>
			<str name="fl">*,fullText:fullText_de</str>
	  </lst>
	</requestHandler>

	<requestHandler name="/admin/"
		class="org.apache.solr.handler.admin.AdminHandlers" />
	
	<lockType>none</lockType>
	
	<admin>
		<defaultQuery>*:*</defaultQuery>
	</admin>

</config>


Hope this will help.

Francesco

-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@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

Posted by Chris Hostetter <ho...@fucit.org>.
: 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

Posted by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch>.
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": 0,
      "prepare": {
        "time": 0,
        "query": {
          "time": 0
        },
        "facet": {
          "time": 0
        },
        "mlt": {
          "time": 0
        },
        "highlight": {
          "time": 0
        },
        "stats": {
          "time": 0
        },
        "debug": {
          "time": 0
        }
      },
      "process": {
        "time": 0,
        "query": {
          "time": 0
        },
        "facet": {
          "time": 0
        },
        "mlt": {
          "time": 0
        },
        "highlight": {
          "time": 0
        },
        "stats": {
          "time": 0
        },
        "debug": {
          "time": 0
        }
      }
    }
  }
}

Francesco



-----Original Message-----
From: Jack Krupansky [mailto:jack@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) <fc...@id.ethz.ch> 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

Posted by "Croci Francesco Luigi (ID SWS)" <fc...@id.ethz.ch>.
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:jack@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) <fc...@id.ethz.ch> 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

Posted by Jack Krupansky <ja...@basetechnology.com>.
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)
<fc...@id.ethz.ch> 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

Posted by Erick Erickson <er...@gmail.com>.
What version of Solr? Works fine for me.

Best,
Erick

On Wed, Apr 16, 2014 at 6:38 AM, Croci  Francesco Luigi (ID SWS)
<fc...@id.ethz.ch> 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