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
<?php | |
/** | |
* One Creator: "Jane Doe" | |
* Two creators: "Jane Doe and John Doe" | |
* Three creators: "Jane Doe, John Doe, and Jim Doe" | |
* Four or more: "Jane Doe et al." | |
*/ | |
if ($creators) { | |
switch (count($creators) { |
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
<?php | |
/** | |
* One Creator: "Jane Doe" | |
* Two creators: "Jane Doe and John Doe" | |
* Three creators: "Jane Doe, John Doe, and Jim Doe" | |
* Four or more: "Jane Doe et al." | |
*/ | |
if ($creators) { |
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
SELECT `e`.*, `dt`.`name` AS `data_type_name`, `es`.`name` AS `set_name`, `rty`.`name` AS `record_type_name` FROM `hotchkiss_elements` AS `e` | |
LEFT JOIN `hotchkiss_data_types` AS `dt` ON dt.id = e.data_type_id | |
LEFT JOIN `hotchkiss_element_sets` AS `es` ON es.id = e.element_set_id | |
INNER JOIN `hotchkiss_record_types` AS `rty` ON rty.id = e.record_type_id WHERE (rty.name = 'Item' OR rty.name = "All") ORDER BY `e`.`order` ASC, `e`.`element_set_id` ASC |
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
SET NAMES 'utf8' COLLATE 'utf8_unicode_ci'; | |
SET @set_name := 'Dublin Core'; | |
SET @element_name := 'Coverage'; | |
SET @label := 'Greeting'; | |
SET @facet := 1; | |
SET @displayed := 1; | |
INSERT INTO omeka_solr_search_facets |
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 static function createFacetSubForm($subform) | |
{ | |
$output = ''; | |
$facetId = $subform->getElement('facetid'); | |
$label = $subform->getElement('label'); | |
$options = $subform->getElement('options'); | |
$id = preg_replace('/\W+/', '_', $label->getFullyQualifiedName()); | |
$output .= '<tr>'; |
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
(defn m | |
"Measures the number of consonant sequences between | |
the start of word and position j. If c is a consonant | |
sequence and v a vowel sequence, and <...> indicates | |
arbitrary presence, | |
<c><v> -> 0 | |
<c>vc<v> -> 1 | |
<c>vcvc<v> -> 2 | |
<c>vcvcvc<v> -> 3 | |
... |
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
user=> (defn test-m [stemmer] [stemmer (m stemmer) (m2 stemmer)]) | |
#'user/test-m | |
user=> (-> (make-stemmer "ba") test-m) | |
[{:word [\b \a], :index 1} 0 0] | |
user=> (-> (make-stemmer "bava") test-m) | |
[{:word [\b \a \v \a], :index 3} 1 0] | |
user=> (-> (make-stemmer "baba") test-m) | |
[{:word [\b \a \b \a], :index 3} 1 0] | |
user=> (-> (make-stemmer "bababa") test-m) |
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
[Exhibits] | |
id-column=eid | |
result-type=Exhibits | |
table={$prefix}_exhibits | |
flag=public | |
tagged=yes | |
[Exhibits.title] | |
[Exhibits.description] |
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
protected function _addFacetMappings() | |
{ | |
$sql = <<<SQL | |
INSERT INTO `{$this->_db->prefix}solr_search_facets` | |
(element_id, name, element_set_id, is_facet, is_displayed, is_sortable) | |
VALUES (?, ?, ?, ?, ?, ?); | |
SQL; | |
$stmt = $this->_db->prepare($sql); | |
// These get inserted fine. |
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
curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>' |