About charlesnagy

I'm out of many things mostly automation expert, database specialist, system engineer and software architect with passion towards data, searching it, analyze it, learn from it. I learn by experimenting and this blog is a result of these experiments and some other random thought I have time to time.

Solr dynamic field with data importer

solr

I’m managing a Solr installation which holds products for an e-commerce site. Lately a new feature was introduced. Namely, every product type can have specific dynamic attributes which is configurable on the Type level. For example monitor types have resolution, size, etc. while processor types have clock frequency, socket, L2 … Continue reading

Flashcache stats collector for Diamond / Graphite

I have upgraded the LVM collector in my StorageCollector repository on github (https://github.com/charlesnagy/Diamond-StorageCollectors) to match the new directory structure of Diamond and added support to collect flashcache metrics.

Installation

Move the flashcache directory to your collectors directory which should exist on /usr/local/share/diamond/collectors or /usr/share/diamond/collectors path depending on your installation.

Continue reading

Difference between DISTINCT and GROUP BY

Today we had an interesting situation where the same query was executed significantly slower when it was written with GROUP BY instead of DISTINCT and I saw many people still had the assumption that these two types of queries are actually equivalent which is simply not true. Although DISTINCT queries … Continue reading

The four phases of learning

Unawareness

Life long learning? I hate this expression but kind of expresses the importance of learning. Why? Because nowdays (especially on the field of IT) if you’re not progressing you’re regressing. There’s no middle way, no stagnation. Years are passing while you may be getting comfortable and years later you … Continue reading

Dataimport handler for Sunburnt Solr python library

Dataimport handler

I had to trigger the dataimporter delta-import command from the code so I added support for this function.

Example:

Following properties are available in the SolrImportStatus (_response.import_status) object:

Source code can be found on my github page:  Continue reading

Sunburnt Solr spatial filter support

I’ve added spatial filtering to the sunburnt library. The feature is now available with filter_spatial function.

Example usage

Currently this will use bbox by default. I’m planning to add more features to it in the future but so far it fits my needs. Let me know if you … Continue reading