6

We are using si4t kind of out of the box (with a few tweaks) but we have noticed that the binaries are going into SOLR using the binary path as the URL. We have a setup where the path has an additional folder at the front (I.e. /sitename/images) and the URL is set to just /images.

It does seem that in the storage extension JPASearchBinaryDAO.java the binary content doesn't seem to hold the URL information and you have to get the Binary variant object to get the URL.

Have I configured this incorrectly or do you currently need to have a path equaling the URL for this to function correctly?

2
  • Hi James, the JPASearchBinaryContentDAO (you mean this one right?) does indeed not have the URL. We're working on getting this either through metadata or by indeed getting the Variant - but I'm not sure whether that works with newly created binaries. Does it work for you?
    – Raimond
    Jul 21, 2015 at 14:18
  • You are right. We tried to get the URL via the binary variant but it doesn't work for new Binaries. I believe because the binary variant runs after so when JPASearchBinaryContentDAO runs so when you have a new binary it doesn't yet exist. Jul 23, 2015 at 9:13

1 Answer 1

1

To my knowledge a binary storage DAO doesn't know or care about the publish URL of a binary.

What you would get back from a search on SOLR would therefore not be the relative URL but the relative path where the binary is physically stored. If the URL can be inferred from the path (as in your case) you can handle this in the code that displays the results.

You are right in assuming that if those two are equal it will 'accidentally' work out-of-the-box.

1
  • Thanks for the update. If we can't do this we will have to infer it from the path (I just felt a bit dirty doing it so wanted to check if there was a better way first!!!). Thanks for the answer. Jul 23, 2015 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.