background preloader

Databases

Facebook Twitter

MatthewCosgrve : @planetmoney #interpreting... Download Stock Data and Historical Quotes for Global Indices [INDEX] Query - How to select distinct field values using Solr. SimpleFacetParameters. Solr provides a Simple Faceting toolkit which can be reused by various Request Handlers to include a "Facet counts" section within a search response.

SimpleFacetParameters

This extra section provides a breakdown or summary of the results based on some simple criteria, which can be used to help implement more advanced search interfaces. Use of faceting does not affect the results section of a search response. The SearchHandler uses these utilities via the FacetComponent, which supports the parameters listed here. For More information on General Issues involved with Faceted searches in Solr, please read the SolrFacetingOverview. These are the parameters used to drive the Simple Faceting behavior, grouped by the type of faceting they support. Note that many parameters may be overridden on a per-field basis with the following syntax: ACID versus BASE for database transactions.

Database developers all know the ACID acronym.

ACID versus BASE for database transactions

It says that database transactions should be: Atomic: Everything in a transaction succeeds or the entire transaction is rolled back.Consistent: A transaction cannot leave the database in an inconsistent state.Isolated: Transactions cannot interfere with each other.Durable: Completed transactions persist, even when servers restart etc. These qualities seem indispensable, and yet they are incompatible with availability and performance in very large systems. For example, suppose you run an online book store and you proudly display how many of each book you have in your inventory. Every time someone is in the process of buying a book, you lock part of the database until they finish so that all visitors around the world will see accurate inventory numbers.

Amazon might instead use cached data. There is a computer science theorem that quantifies the inevitable trade-offs. A SWEET Little MySQL Function: Group_Concat. The Scenario You're writing code to perform authentication for a web-based app.

A SWEET Little MySQL Function: Group_Concat

Your users live in one table (Site_User), your list of site permissions live in another table (systemRoles), and the two are related via a junction table (jctUserRole) that manages the many to many relationship there. Your backend database: MySQL version 5 or better. So, in an ideal world, you will be able to write a single query that will both authenticate the user AND retrieve a comma delimited list of their roles contained in a single field; if their credentials are good, your result will only have a single record in it.

Typically, however, because of the way many to many relationships are normalized, the "one query" you want will be returning multiple rows...one row for each permission the authenticating user is related to. S Blog: Faceting and Multifaceting syntax in Solr 1.4. Introduction So you've installed Solr 1.4 and you've managed to get some data indexed.

s Blog: Faceting and Multifaceting syntax in Solr 1.4

Now you're ready to have some fun with faceting. Faceting is basically just filtering the results of a search without effecting the relevance score. Sites such as ebay use faceting to help narrow down the results of a generic search like TV, to give you options such as 32" wide-screen LCD etc. It makes for a very pleasant user experience. Field Faceting Now when you're indexing data in Solr, it's best to use the "text" field type, as this applies lots of filters which will help sort out plurals, remove white space etc. You can use the copyfield keyword to make this process very easy.For example if you have a field called county Now, when you index county, Solr will use the text field for searching and the string field for displaying the facet results. Lets get faceting First up you'll need to turn on the faceting as it's turned off by default.

You can apply extra keywords to: limit the results Multifaceting. MySQL server has gone away” Part 1: max_allowed_packet. Most MySQL users have tried getting this rather cryptic error message: “MySQL server has gone away”.

MySQL server has gone away” Part 1: max_allowed_packet.

The MySQL documentation describes lots of possible reasons for this here: However this page is of little help for most users, I think. Dozens of reasons are listed, but except for the trivial ones (like physical connection was lost, the MySQL server or the machine where it runs has crashed etc.) there are a few reasons for this that are very common in our experience and a lot of those mentioned are not. Here we will discuss one situation that to our experience happens very frequently for people working across multiple servers. The situation is that if a client sends a SQL-statement longer than the server max_allowed_packet setting, the server will simply disconnect the client. Actually I have not seen the ‘got packet bigger ..’ error myself for many years.

Does anybody have any idea about if and why ‘got packet bigger’ now effectively seems to have ‘gone away’ too? MariaDB 5.5.21 Release Notes - AskMonty KnowledgeBase. The most recent release in the MariaDB 5.5 series is: MariaDB 5.5.37 Download | Release Notes | Changelog | Overview of 5.5 Release date: 16 Mar 2012.

MariaDB 5.5.21 Release Notes - AskMonty KnowledgeBase

Download historical stock quotes for MetaStock. Free trial! Award winning financial software.