Wednesday, May 27, 2009

Solr wildcards and omitnorms

I have been using solr for some time now. And I like the tool. With its schema definition it does allow a level of flexibility.
So the other day I was working on a task where I wanted to match a "text" field with wildcard queries e.g. "doc*" or "C*". But even after trying to hours I could not get it working... Until ofcourse I experimented with the omitnorms attribute on the field definition. I was able to confirm that by using omitnorms="true" on the field I was able to perform wildcard searches.



<field name="categoryCode" type="text" multivalued="true" indexed="true" stored="true" omitnorms="true">


I could not find any document on solr wiki that explaned about wildcards and omitnorms. I hope this saves someone time.

Do post your comments/findings.

Tuesday, April 28, 2009

Ubuntu 9.04 High CPU Utilization

I upgraded recently to Ubuntu 9.04 from 8.10. Even though 9.04 has a better boot up time, for some reason my CPU Utilization always stayed at 50-60%. This was slowing me down and was annoying since my laptop fan would just not stop making that irritating sound. I tried most of the things that were posted on some forums but none seemed to fix it. Finally one think that I noticed in the "top" command was vino-server taking up some CPU cycles.
So to try it out, I disabled the remote desktop sharing using the 'vino-preferences'. This fixed my CPU utilization.



To give this a try, just type 'vino-preferences' on your shell:

1) then just uncheck the 'Allow Other users to view your desktop' checkbox under 'Sharing'
2) Press 'Close'.

Hopefully this will be helpfull to someone.



If this does not help, you may also try
1) Make sure you have FireFox latest updates
2) Try disabling(i.e Selecting 'None') Visual Effects from System->Preferences->Appearance->Visual Effects.
3) Disabling CPU Frequency Manager from System->Administration->Services