1/18/2012

How to clean / delete your solr index

If you want to wipe / clean / delete / recreate your local index you will notice that you can´t do that using your solr admin and luke also doesn´t help.


What helps is sending this statement to your solr server:


http://localhost:8083/solr/your-index-name/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&commit=true


This command deletes everything and performs a commit. If you are using luke you need to re-open your index to see that the changes took effect.


If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.

1/09/2012

1/07/2012

ICEFaces selectInputDate Not working

If you have been using ice:selectInputDate and have been struggeling to get it working, here is a hint:


The calendar icon of the selectInputDate element will not show if you have not added this line to your liferay-plugin-package.properties:


speed-filters-enabled= false

Don´t ask me why, but it seems to mess with the javascript created by ICEfaces that the date popup needs to appear. Add this line and it should work.


If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.

Can only redirect during ACTION_PHASE: Redirect and ICEfaces

If you are using ICEFaces 2 and you wonder why you can´t use this to perform a redirect in your backing bean action method:

FacesContext.getCurrentInstance().getExternalContext().redirect("http://www.somewhere.com");

and you are getting the following Exception:


java.io.UnsupportedEncodingException: 
Can only redirect during ACTION_PHASE at org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl.redirect(PortletContainerLiferayImpl.java:233) 
at org.portletfaces.bridge.context.ExternalContextImpl.redirect(ExternalContextImpl.java:412) 
at com.brightsky.bean.WorkBasketModelBean.navigateToPage(WorkBasketModelBean.java:39) 
at com.brightsky.bean.WorkBasketBackingBean.navigateToPage(WorkBasketBackingBean.java:65) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)




Then you might want to update your portlet faces bridge to version 2.0.1. 
They added support for redirecting outside the Action Phase.
You can get it here: http://www.portletfaces.org/portletfaces-bridge/downloads


If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.