<?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 different search result from [Alfresco share] and using REST API Search/Solr6 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/different-search-result-from-alfresco-share-and-using-rest-api/m-p/126118#M34358</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Im facing some problem, for which Im not finding any reasonable answear.&lt;/P&gt;&lt;P&gt;I have clean install of Alfresco Community Edition 7.3 (docker). I add test files with names test_1.txt, 1.txt, 1-1.txt, 1-2.txt. All of them are simple text files containig one word [test].&lt;/P&gt;&lt;P&gt;When Im using Alfresco Share app, Node Browser -&amp;gt; in query use TEXT:test, language [fts-alfresco] it gives me 9 results (it includes also some default files from Alfresco instance). So it works as I expect and search also in files content.&lt;/P&gt;&lt;P&gt;On the other hand when Im trying to get same result using search API&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;using body:&lt;/P&gt;&lt;PRE&gt;{
    "query": {
       "language": "afts",
       "query": "TEXT:test"
    },
    "fields": ["id", "name", "search"],
    "sort": {
    		"type": "SCORE"
    }
}&lt;/PRE&gt;&lt;P&gt;in response I get only 6 files, it does not contain files where file content have word test inside, but not in name.&lt;/P&gt;&lt;P&gt;What's more, querying Solr6 from admin panel (&lt;A href="http://localhost:8083/solr/#/alfresco/query" target="_blank" rel="noopener nofollow noreferrer"&gt;http://localhost:8083/solr/#/alfresco/query&lt;/A&gt;), with query [TEXT:test], also provide only 6 results. So Solr6 and REST API works the same way.&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;why Alfresco share Node Browser return more results?&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;why Solr6 does not return files by content?&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;(I noticed that in version 7.3 by default Solr properties in file [shared.properties] have comment out to index context. Uncomment this configuration helped.)&lt;/P&gt;&lt;P&gt;Thank you very much for any help.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 13:55:25 GMT</pubDate>
    <dc:creator>pawel_w_s</dc:creator>
    <dc:date>2022-12-07T13:55:25Z</dc:date>
    <item>
      <title>different search result from [Alfresco share] and using REST API Search/Solr6</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/different-search-result-from-alfresco-share-and-using-rest-api/m-p/126118#M34358</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Im facing some problem, for which Im not finding any reasonable answear.&lt;/P&gt;&lt;P&gt;I have clean install of Alfresco Community Edition 7.3 (docker). I add test files with names test_1.txt, 1.txt, 1-1.txt, 1-2.txt. All of them are simple text files containig one word [test].&lt;/P&gt;&lt;P&gt;When Im using Alfresco Share app, Node Browser -&amp;gt; in query use TEXT:test, language [fts-alfresco] it gives me 9 results (it includes also some default files from Alfresco instance). So it works as I expect and search also in files content.&lt;/P&gt;&lt;P&gt;On the other hand when Im trying to get same result using search API&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;using body:&lt;/P&gt;&lt;PRE&gt;{
    "query": {
       "language": "afts",
       "query": "TEXT:test"
    },
    "fields": ["id", "name", "search"],
    "sort": {
    		"type": "SCORE"
    }
}&lt;/PRE&gt;&lt;P&gt;in response I get only 6 files, it does not contain files where file content have word test inside, but not in name.&lt;/P&gt;&lt;P&gt;What's more, querying Solr6 from admin panel (&lt;A href="http://localhost:8083/solr/#/alfresco/query" target="_blank" rel="noopener nofollow noreferrer"&gt;http://localhost:8083/solr/#/alfresco/query&lt;/A&gt;), with query [TEXT:test], also provide only 6 results. So Solr6 and REST API works the same way.&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;why Alfresco share Node Browser return more results?&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;why Solr6 does not return files by content?&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;(I noticed that in version 7.3 by default Solr properties in file [shared.properties] have comment out to index context. Uncomment this configuration helped.)&lt;/P&gt;&lt;P&gt;Thank you very much for any help.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 13:55:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/different-search-result-from-alfresco-share-and-using-rest-api/m-p/126118#M34358</guid>
      <dc:creator>pawel_w_s</dc:creator>
      <dc:date>2022-12-07T13:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: different search result from [Alfresco share] and using REST API Search/Solr6</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/different-search-result-from-alfresco-share-and-using-rest-api/m-p/126119#M34359</link>
      <description>&lt;P&gt;By default Share is searching also in Name, Title, Description and TAG properties.&lt;/P&gt;
&lt;P&gt;You may create an equivalent query in AFTS Syntax for Node Browser / REST API. Or just remove the "TEXT:" from your AFTS query to get results from default text fields:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Alfresco/InsightEngine/blob/master/search-services/alfresco-search/src/main/java/org/alfresco/solr/query/AlfrescoDefaultTextFields.java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/Alfresco/InsightEngine/blob/master/search-services/alfresco-search/src/main/java/org/alfresco/solr/query/AlfrescoDefaultTextFields.java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 09:24:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/different-search-result-from-alfresco-share-and-using-rest-api/m-p/126119#M34359</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2022-12-12T09:24:01Z</dc:date>
    </item>
  </channel>
</rss>

