Giter Site home page Giter Site logo

nhart / islandora_authority Goto Github PK

View Code? Open in Web Editor NEW

This project forked from discoverygarden/islandora_authority

0.0 1.0 0.0 110 KB

Autocompletion from a set of (Solr indexed) authority records into a set of fields.

License: GNU General Public License v3.0

CSS 1.36% PHP 68.78% JavaScript 29.86%

islandora_authority's Introduction

Islandora Authority Module Build Status

Introduction

This module adds two Drupal form API elements and a menu path used for autocompletion used for autocompletion on one of them. These two new elements are:

  • islandora_authority_textfield: A textfield which can autocomplete on a Solr field.
  • islandora_authority_hidden: A hidden element which can be autocompleted, as a result of a search.

One caveat: Due to how we perform lookups, forms in which these elements must pass through Objective Forms to recieve #hash values.

Requirements

This module requires the following modules/libraries:

Installation

Install as usual, see this for further information.

Configuration

Our configuration is stored in #user_data on our islandora_authority_textfield and islandora_authority_hidden elements.

Generally, multiple islandora_authority elements are direct children of a common parent. The framework defines a single parameter on the parent:

  • islandora_authority_controller: A machine name indicating the controller to use. Defaults to solr if otherwise unspecified.

Solr Controller

Machine name: solr

This controller is attempted if no other is specified.

The Solr controller defines two parameters on the parent element:

  • islandora_authority_t_pattern: A pattern as used by Drupal's format_string()/t() function.
  • islandora_authority_fq: A list of tilde-separated Lucene statements, e.g.: PID:ir*, to ensure all results come from the IR namespace. (Note: separating is done via a naive explode; tildes in values break it)

Each contained authority element specifies:

  • islandora_authority_solr_search_field: Should be an EdgeNGram'd Solr field.
  • islandora_authority_solr_validate_field: An optional Solr field to validate the contents of the element against. This does not prevent the form from being saved; it simply provides visual feedback on form load and element change for whether the field contains an authorized value. This should be an untokenized Solr field.
  • islandora_authority_solr_display_field: An optional Solr field, used for display purposes (defaults to the search field).
  • islandora_authority_mapping: An optional placeholder, which will make values for this field available for substitution into the t_pattern above.
  • islandora_authority_search_without_dismax: A flag which should be set (to "true") when islandora_authority_solr_search_field is not an EdgeNGram'd Solr field, so queries will be made as (non-dismax) prefix queries instead of depending on the behaviour of EdgeNGrams. Note that EdgeNGrams are more predicatable in the results they return; prefix/wildcard queries skip analysis, so indexing analysis can result in false-negatives.

Troubleshooting/Issues

Having problems or solved a problem? Contact discoverygarden.

Maintainers/Sponsors

Current maintainers:

Development

If you would like to contribute to this module, please check out our helpful Documentation for Developers info, as well as our Developers section on the Islandora.ca site.

License

GPLv3

islandora_authority's People

Contributors

adam-vessey avatar daniel-dgi avatar jordandukart avatar matthewperry avatar nhart avatar nigelgbanks avatar nmader avatar willtp87 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.