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].


[1] http://lucene.apache.org/core/3_6_0/scoring.html#Score%20Boosting 
[2] http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_make_.22superman.22_in_the_title_field_score_higher_than_in_the_subject_field 

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]));
}
instead
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]);

References

[1] http://logging.apache.org/log4j/1.2/manual.html
[2] http://logging.apache.org/log4j/2.x/performance.html

sábado, 7 de julho de 2012

a4j:repeat rowKeyVar

rowKeyVar

terça-feira, 26 de junho 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).
[1] http://ux.stackexchange.com/questions/1795/when-to-use-icons-vs-icons-with-text-vs-just-text-links
[2] http://designaday.tumblr.com/post/91812707/back-to-basics-icons-vs-text
[3] http://www.ixda.org/node/19518 
[4] http://uxmyths.com/post/715009009/myth-icons-enhance-usability
[5] http://www.smallfarmdesign.com/blog/2009/12/28/the-problem-with-icons/
[6] http://blogs.msdn.com/b/jensenh/archive/2005/11/01/487661.aspx