<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic I don't understand the score of Lucene in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/i-don-t-understand-the-score-of-lucene/m-p/264745#M217875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to order the results that I obtain throw Lucene search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Query query = new Query(Constants.QUERY_LANG_LUCENE, sQuery);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;QueryResult queryResult = repositoryService.query(store, query, false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ResultSet results = queryResult.getResultSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rows = results.getRows();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Each row has a score associated that we can obtain doing this: row.getScore().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I don't understand the puntuation of this score, or it don't works like I want. (Order by number of hits in the content of the file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 4 files in Alfresco, each one with the word "hit" repeat some times. These are the files and the score that Alfresco returns me when I search the word: "hit".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- File 1.txt (one "hit" in the text) -&amp;gt; score = 1.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- File 2.txt (hit hit) -&amp;gt; score = 0.9847&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- File 3.txt (hit hit hit) -&amp;gt; score = 0.9824&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- File 4.txt (hit hit hit hit hit hit hit hit hit hit) -&amp;gt; score = 0.9984&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand. The max score is the file 1 with only one "hit" word in the file? And the min is the File 3 with 3 hits? And the second position is to File 4 with 10 hits in the text (this should have the max score)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the problem? Should I specify in the search query the order for obtain a correct score? Have you implemented something similar? To obtain a set of results order by the number of hits in the text…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Dec 2010 11:42:45 GMT</pubDate>
    <dc:creator>spilby</dc:creator>
    <dc:date>2010-12-02T11:42:45Z</dc:date>
    <item>
      <title>I don't understand the score of Lucene</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/i-don-t-understand-the-score-of-lucene/m-p/264745#M217875</link>
      <description>Hi,I'm trying to order the results that I obtain throw Lucene search.Query query = new Query(Constants.QUERY_LANG_LUCENE, sQuery);QueryResult queryResult = repositoryService.query(store, query, false);ResultSet results = queryResult.getResultSet();rows = results.getRows();Each row has a score associ</description>
      <pubDate>Thu, 02 Dec 2010 11:42:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/i-don-t-understand-the-score-of-lucene/m-p/264745#M217875</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2010-12-02T11:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: I don't understand the score of Lucene</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/i-don-t-understand-the-score-of-lucene/m-p/264746#M217876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Spilby,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;maybe the search term also appears in the title or some other field? That would yield a much higher score than a hit in the text (or even several).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tim&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Dec 2010 14:57:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/i-don-t-understand-the-score-of-lucene/m-p/264746#M217876</guid>
      <dc:creator>tim-erwin</dc:creator>
      <dc:date>2010-12-14T14:57:19Z</dc:date>
    </item>
  </channel>
</rss>

