Hi All,
Im facing some problem, for which Im not finding any reasonable answear.
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].
When Im using Alfresco Share app, Node Browser -> 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.
On the other hand when Im trying to get same result using search API
http://localhost:8080/alfresco/api/-default-/public/search/versions/1/search
using body:
{ "query": { "language": "afts", "query": "TEXT:test" }, "fields": ["id", "name", "search"], "sort": { "type": "SCORE" } }
in response I get only 6 files, it does not contain files where file content have word test inside, but not in name.
What's more, querying Solr6 from admin panel (http://localhost:8083/solr/#/alfresco/query), with query [TEXT:test], also provide only 6 results. So Solr6 and REST API works the same way.
Questions:
why Alfresco share Node Browser return more results?
why Solr6 does not return files by content?
(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.)
Thank you very much for any help.
By default Share is searching also in Name, Title, Description and TAG properties.
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:
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.