Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, I Am Having A Problem That Debug Images Are Not Shown After Clearml Server Migration. I Found A Solution On This Page:

Hello, I am having a problem that debug images are not shown after ClearML server migration. I found a solution on this page: https://clear.ml/docs/latest/docs/faq/#debug-images-andor-artifacts-are-not-loading-in-the-u[…]clearml-server-to-a-new-address-how-do-i-fix-this---- But curl request provided is incomplete. It needs a URL to POST a request to. Plain elastic host it not working (localhost:9200) neither is localhost:9200/<index-name>. Any help? Thanks.

  
  
Posted 6 months ago
Votes Newest

Answers 35


I'll get back to you in a minute

  
  
Posted 6 months ago

I figured it was something with syntax but I thought single ticks inside double quotes should work without escaping 😀

  
  
Posted 6 months ago

Please share you command

  
  
Posted 6 months ago

CostlyOstrich36 Old debug samples. My URL for files server has changed, and old debug sampled are not shown.

  
  
Posted 6 months ago

Can you please share it as a text
It is indistinguishable visually but I want to make sure that each single quote is replaced with single quote slash single quote single quote
and not single quote slash double quote

  
  
Posted 6 months ago

No. It is actually string concatenation. What you actually get is that an original string is broken into several parts. That are concatenated as following:
-d'{....' + ' + '....}'

  
  
Posted 6 months ago

ResponsiveKoala38 My bad, I was indeed using double quotes. I fixed it and now script is working. I'll wait for results

  
  
Posted 6 months ago

Hi BoredBat47 , did the last update urls command work for you? I want to update our documentation

  
  
Posted 6 months ago

ResponsiveKoala38 Thanks a lot for the help. Keep up the good work!

  
  
Posted 6 months ago

ResponsiveKoala38 Now I can see the images where previously it was placeholders with text "Unable to upload the images"

  
  
Posted 6 months ago

''' = ' + ' + '

  
  
Posted 6 months ago

ResponsiveKoala38 Sure, I'll get back to you as it finishes

  
  
Posted 6 months ago

ResponsiveKoala38 Shouldn't the escape slash be before the quote?

  
  
Posted 6 months ago

CostlyOstrich36 My question basically is what host do I need to send POST request to change paths? curl to localhost:9200 (where elastic is running) is not working

  
  
Posted 6 months ago

Ah, I see. I forgot to escape the single quotes inside script. Please replace the current script source:
"ctx._source.url = ctx._source.url.replace('http://<MY_OLD_ADDRESS>', ' None .<NEW_ADDRESS>')"
With the escaped one:
"ctx._source.url = ctx._source.url.replace('''http://<MY_OLD_ADDRESS>''', ''' None .<NEW_ADDRESS>''')"

  
  
Posted 6 months ago

You'd have to change the URLs in elastic itself

  
  
Posted 6 months ago

About the prefix part I think it should not matter. Just put your prefix instead of ' None .<ADDRESS>'

  
  
Posted 6 months ago

BoredBat47 Please try running the following command

curl -XPOST -H 'Content-Type: application/json' 'localhost:9200/events-training_debug_image-*/_update_by_query?conflicts=proceed' -d'{
    "script": {
        "source": "ctx._source.url = ctx._source.url.replace('
.<OLD_ADDRESS>', '
.<NEW_ADDRESS>')",
        "lang": "painless"
    },
    "query": {"prefix": {"url": {"value": "
.<OLD_ADDRESS>", "case_insensitive": true}}}
}'
  
  
Posted 6 months ago

BoredBat47 Can you please share the exact command that you are running?

  
  
Posted 6 months ago

image

  
  
Posted 6 months ago

Should I remove "case-sensitive" option from a query?

  
  
Posted 6 months ago

ResponsiveKoala38 Hello. What if my old fileserver address was not matching the None scheme? It was http and didn't have a domain, only ip address. Should I put my old address as it was in the replace method?

  
  
Posted 6 months ago

Yeah, they should:) The problem is that they are inside outer single quotes -d'{...}'

  
  
Posted 6 months ago

Hi BoredBat47 , please try to remove the ", "case_insensitive": true" from the last line of the command that I sent to you

  
  
Posted 6 months ago

Great! Thanks:)

  
  
Posted 6 months ago

image

  
  
Posted 6 months ago

A bit confusing. But this is what linux shell wants if you have single quotes inside double quotes inside outer single quotes

  
  
Posted 6 months ago

Please let me know if it fixes the UI. I will ask to update our documentation then

  
  
Posted 6 months ago

ResponsiveKoala38 It fixed the issue!

  
  
Posted 6 months ago