cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles with Solr admin serching

vladislavlysov
Champ in-the-making
Champ in-the-making
Hello!!!
    I was install Alfresco 4.0b and uploaded a few files(with .txt extension) through the Share. After that a was opened Solr admin at this URL http:\\localhost:8888\solr\alfresco\admin. Then I typed my query(for example - " @cm\:name:"green banana"") in the query field. I know - this file in Alfresco Share, i see him) But this query returned 0 documents. I think this is due to the fact that he was looking at some other location, not in Alfresco Repository.How can I ensure that my query returns a found documents downloaded from Alfresco Share?
P.S. If i type in query field this query "*:*", its returned next json

{
"responseHeader":{
  "status":0,
  "QTime":15,
  "params":{
   "indent":"on",
   "start":"0",
   "q":"*:*",
   "rows":"10",
   "version":"2.2"}},
"response":{"numFound":1658,"start":0,"docs":[
   {
    "INACLTXID":["1"],
    "ACLID":["1"],
    "ID":["ACL-1"]},
   {
    "INACLTXID":["1"],
    "ACLID":["2"],
    "ID":["ACL-2"]},
   {
    "INACLTXID":["1"],
    "ACLTXCOMMITTIME":["1320818862645"],
    "ACLTXID":["1"],
    "ID":["ACLTX-1"]},
   {
    "INACLTXID":["2"],
    "ACLID":["3"],
    "ID":["ACL-3"]},
   {
    "INACLTXID":["2"],
    "ACLID":["4"],
    "ID":["ACL-4"]},
   {
    "INACLTXID":["2"],
    "ACLTXCOMMITTIME":["1320818862942"],
    "ACLTXID":["2"],
    "ID":["ACLTX-2"]},
   {
    "INACLTXID":["3"],
    "READER":["GROUP_EVERYONE"],
    "ACLID":["5"],
    "ID":["ACL-5"]},
   {
    "INACLTXID":["3"],
    "ACLTXCOMMITTIME":["1320818863113"],
    "ACLTXID":["3"],
    "ID":["ACLTX-3"]},
   {
    "INACLTXID":["4"],
    "READER":["GROUP_EVERYONE"],
    "ACLID":["6"],
    "ID":["ACL-6"]},
   {
    "INACLTXID":["4"],
    "ACLTXCOMMITTIME":["1320818863145"],
    "ACLTXID":["4"],
    "ID":["ACLTX-4"]}]
}}
Thank you.
10 REPLIES 10

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi VladislavLysov,

  When I fire a query from https://localhost:8443/solr/alfresco/admin/form.jsp like @cm\:name:"test" It is not showing any result! 😞

  How can I know that It is connected with alfresco repository while using SOLR UI? Plz help.

mcasanket
Champ on-the-rise
Champ on-the-rise
Hello!!!
    I was install Alfresco 4.0b and uploaded a few files(with .txt extension) through the Share. After that a was opened Solr admin at this URL http:\\localhost:8888\solr\alfresco\admin. Then I typed my query(for example - " @cm\:name:"green banana"") in the query field. I know - this file in Alfresco Share, i see him) But this query returned 0 documents. I think this is due to the fact that he was looking at some other location, not in Alfresco Repository.How can I ensure that my query returns a found documents downloaded from Alfresco Share?
P.S. If i type in query field this query "*:*", its returned next json

{
"responseHeader":{
  "status":0,
  "QTime":15,
  "params":{
   "indent":"on",
   "start":"0",
   "q":"*:*",
   "rows":"10",
   "version":"2.2"}},
"response":{"numFound":1658,"start":0,"docs":[
   {
    "INACLTXID":["1"],
    "ACLID":["1"],
    "ID":["ACL-1"]},
   {
    "INACLTXID":["1"],
    "ACLID":["2"],
    "ID":["ACL-2"]},
   {
    "INACLTXID":["1"],
    "ACLTXCOMMITTIME":["1320818862645"],
    "ACLTXID":["1"],
    "ID":["ACLTX-1"]},
   {
    "INACLTXID":["2"],
    "ACLID":["3"],
    "ID":["ACL-3"]},
   {
    "INACLTXID":["2"],
    "ACLID":["4"],
    "ID":["ACL-4"]},
   {
    "INACLTXID":["2"],
    "ACLTXCOMMITTIME":["1320818862942"],
    "ACLTXID":["2"],
    "ID":["ACLTX-2"]},
   {
    "INACLTXID":["3"],
    "READER":["GROUP_EVERYONE"],
    "ACLID":["5"],
    "ID":["ACL-5"]},
   {
    "INACLTXID":["3"],
    "ACLTXCOMMITTIME":["1320818863113"],
    "ACLTXID":["3"],
    "ID":["ACLTX-3"]},
   {
    "INACLTXID":["4"],
    "READER":["GROUP_EVERYONE"],
    "ACLID":["6"],
    "ID":["ACL-6"]},
   {
    "INACLTXID":["4"],
    "ACLTXCOMMITTIME":["1320818863145"],
    "ACLTXID":["4"],
    "ID":["ACLTX-4"]}]
}}
Thank you.

openpj
Elite Collaborator
Elite Collaborator
Have you tried to execute the following query?

@cm\:name:"tes*"
Hope this helps.

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi,
   I have tried what you suggested, but it returns the following result.

{
"responseHeader":{
  "status":0,
  "QTime":0,
  "params":{
   "indent":"on",
   "start":"0",
   "q":"@cm\\:name:\"tes*\"",
   "rows":"10",
   "version":"2.2"}},
"response":{"numFound":0,"start":0,"docs":[]
}}

  One more thing, my Alfresco 4.0 is using Solr now. but When I go to Solr home page https://localhost:8443/solr/alfresco/admin/ and try @cm\:name:"tes*" it returns the above response. I am not able to know that Whether it is connected with my alfresco repository or not. Also in my alfresco admin Console I am not able to see the Solr related page…. plz help

Have you tried to execute the following query?

@cm\:name:"tes*"
Hope this helps.

jpfi
Champ in-the-making
Champ in-the-making
Hi,
you cannot directly executean Alfresco lucene/afts query string using default solr query component (via solr admin interface).
In this case you have to know how Alfresco's SolrUpdateHandler & FieldType indexes the document:
Warning: normally you won't query Solr directly, only via Alfresco's searchService, e.g. to ensure correct permission checks (filterQuery)
e.g. cm:name will be indexed in different ways with follwing Solr field names:
@{http://www.alfresco.org/model/content/1.0}name
@{http://www.alfresco.org/model/content/1.0}name.__
@{http://www.alfresco.org/model/content/1.0}name.__.u
@{http://www.alfresco.org/model/content/1.0}name.u
@{http://www.alfresco.org/model/content/1.0}name.sort

–> e.g. your query should look like
@\{http\://www.alfresco.org/model/content/1.0\}name:test
…I'm not sure about the escape chars "\"…
cheers, jan

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi Jan,
   Thank you for your quick response.
   You wrote Solr Admin Interface… so you are talking about https://localhost:8443/solr/alfresco/admin/form.jsp?
   Does it mean that I can't query alfresco repository using Solr User interface?

  One more thing, I am not seeing anything related to Solr in Share Admin console 😞

you cannot directly executean Alfresco lucene/afts query string using default solr query component (via solr admin interface).


Please help!  Smiley Sad

jpfi
Champ in-the-making
Champ in-the-making
Hi,
You can query Alfresco's solr index directly, but normally you shouldn't.
What's your use case?
Cheers, jan

mcasanket
Champ on-the-rise
Champ on-the-rise
Hi JanSmiley Very Happy
   Actually I want to Demonstrate the SOLR working with Alfresco Repository. So I tried to hit query from SOLR admin (https://localhost:8443/solr/alfresco/admin/form.jsp). But didn't get success…. 😞

Is there anything like SOLR admin Console in Alfresco shre Amdin Console…? I saw the Image in one post.  When I hit the url localhost:8080/share/page/console/admin-console/solr  showed in the Image it shows nothing… plz help….
[img]https://issues.alfresco.com/jira/secure/attachment/25881/solr_tool.png[/img]


You can query Alfresco's solr index directly, but normally you shouldn't.

Thanking you!

kbonnet
Champ in-the-making
Champ in-the-making
For all future readers. You can test your SOLR indexes via the SOLR admin, by using this url:

/solr/alfresco/afts?q="@{http://www.alfresco.org/model/content/1.0}name:'*''&indent=on

As said permissions are not filtered, so you cannot use this for developing.