This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP TABLE IF EXISTS time_dimension; | |
| CREATE TABLE time_dimension ( | |
| id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
| db_date DATE NOT NULL, | |
| year INTEGER NOT NULL, | |
| month INTEGER NOT NULL, -- 1 to 12 | |
| day INTEGER NOT NULL, -- 1 to 31 | |
| quarter INTEGER NOT NULL, -- 1 to 4 | |
| week INTEGER NOT NULL, -- 1 to 52/53 | |
| day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($comparison->getIds()) { | |
| $identifiers = $comparison->getIds(); | |
| $random = false; | |
| } else { | |
| // we go random | |
| $random = true; | |
| /* @var $conn \Doctrine\DBAL\Connection */ | |
| $conn = $this->get('database_connection'); | |
| $stmt = $conn->executeQuery('SELECT id, managedStatus FROM property p WHERE managedStatus = ?', array(20)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "property" : { | |
| "properties" : { | |
| "id" : { | |
| "type" : "string", | |
| "include_in_all" : true | |
| }, | |
| "leases" : { | |
| "type" : "nested", | |
| "include_in_all" : true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function process(ContainerBuilder $container) | |
| { | |
| if (!$container->hasDefinition('form.extension')) { | |
| return; | |
| } | |
| $types = $container->getDefinition('form.extension')->getArgument(1); | |
| foreach ($container->findTaggedServiceIds('jspeck_choices.form') as $id => $attributes) { | |
| $def = $container->findDefinition($id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This returns all records when used in elastic search head. When used through elastica the response is "no query registered for not" from elastic search. I'm much more concerned about getting it to work in elastic search head so I at least know the query/mapping to use. | |
| Mapping: | |
| { | |
| state: open | |
| settings: { | |
| index.number_of_shards: 5 | |
| index.number_of_replicas: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "query" : { | |
| "filtered": { | |
| "query": { "match_all" : {}}, | |
| "filter": { | |
| "not": { | |
| "nested": { | |
| "path": "leases", | |
| "filter": { | |
| "and": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "filtered": { | |
| "query": { | |
| "bool": { | |
| "should": [ | |
| { | |
| "text": { | |
| "locationNeighborhood.name": { | |
| "query": "dupont", | |
| "analyzer": "snowball" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| _index: website | |
| _type: property | |
| _id: 9 | |
| _version: 1 | |
| _score: 1 | |
| _source: { | |
| id: 9 | |
| unitNumber: 2009 |