segunda-feira, 10 de setembro de 2012

Apache Lucene - Scoring

There are 3 types of score boosting:

Score Boosting [1]

Lucene allows influencing search results by "boosting" in more than one level:
  • Document level boosting - while indexing - by calling document.setBoost() before a document is added to the index.
  • Document's Field level boosting - while indexing - by calling field.setBoost() before adding a field to the document (and before adding the document to the index).
  • Query level boosting * - during search, by setting a boost on a query clause, calling Query.setBoost()
* For dismax type in query level boosting, it is need to specify boosts on fields in parameter qf [2].


quinta-feira, 16 de agosto de 2012

log4j performance

Aiming better performance, in log4j 1.2 [1], you can use:
if(logger.isDebugEnabled() {
    logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
logger.debug("Entry number: " + i + " is " + String.valueOf(entry[i]));
In log4j 2 [2], you can use the new feature
logger.debug("Entry number: {} is {}", i, entry[i]);



sábado, 7 de julho de 2012

segunda-feira, 25 de junho de 2012

segunda-feira, 11 de junho de 2012

Icon vs Text

When use Icons? When use Text?

[1] As rule of thumb, icons alone should only be permitted when at least two out of the following three conditions apply:
  1. Space is very limited (i.e., too small for text alone).
  2. The icons are standardized (e.g., the floppy disk image for save)
  3. The icon represents an object with a strong physical analog or a visual attribute (e.g., a printer icon to access printer attributes, or a red rectangle to set a page background red).

terça-feira, 6 de dezembro de 2011

Managing SQLite Database - SQLite Expert Personal

This is a free and a great SQLite database manager. It also manages the Android SQLite database easily.

SQLite Expert Personal

segunda-feira, 5 de dezembro de 2011

JBoss Envers and Temporal Databases

It can be used in need of Temporal Databases[1]... It is a great option for historic data!

Envers: Easy Entity Auditing
"The Envers project aims to enable easy auditing/versioning of persistent classes. All that you have to do is annotate your persistent class or some of its properties, that you want to audit, with @Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort." [2]