Item10437: Allow typed data from DataForms, Foswiki::Form, registerMETA

pencil
Priority: Enhancement
Current State: Proposal Required
Released In: n/a
Target Release: minor
Reported By: PaulHarvey
Waiting For:
Last Change By: MichaelDaum
Some ideas:
  • META:FIELD indexes: textarea DataForm types (and others) that don't want their value to be indexed/queryable, maybe they can learn to place their 'value' into an attribute other than value? Eg. _value...
    • Consider a mechanism so that QUERY, FORMFIELD, META, Foswiki::Form->renderForDisplay and friends are still able to pull values for non-indexed instances of META:FIELD.
  • registerMETA could have a new option that takes a hash of keys with queryable/index state on/off, Eg. the following might setup META:FIELD so that it may be instantiated with a value attribute which may or may not be indexed; non-indexed instantiations save data into the _value attribute rather than value, and they are linked to one another so that a get will know to try to pull from _value if we access a non-existent value.
    Foswiki::Meta::registerMeta('FIELD', alias => 'fields', many => 1,
        require => [ 'name' ],
        allow => [ qw(value _value title tooltip attr) ],
        noindex => [ '_value' ],
        mapmissing => { value => '_value' }
    );

This has implications for sorting... if the query algo can't sort on the non-indexed field, it should be enough to throw an error back up to SEARCH.

-- PaulHarvey - 03 Mar 2011

the idea here is to reduce the memory footprint of an index by not putting into it values that are not actually useful (for eg, a large textarea makes poor use of an index - as we mostly regex search them)

-- SvenDowideit - 03 Mar 2011

I think the reason my suggestion is convoluted is because I was under the impression that you could only enable indexes on a collection in a way that would be an all or nothing type selection - IE. You either have ALL FIELD.value indexed, or none at all.

The _value approach simply gives an alternative key name to put the unindexed value.

Anyway, another thought... can we enable indexes "on-demand"? I.e. Before firing off a query to mongo, check to see that the document properties we're querying on are actually indexed; enable indexes on any that aren't; then send the query...

... I understand that all this probably isn't practical inside a view request, just brainstorming smile

-- PaulHarvey - 19 Apr 2011

I'm considering adding a no-index hint to the Dataform definition attributes - and hope there's something similar for registerMeta..

-- SvenDowideit - 19 Apr 2011

Closed Item10721 as a duplicate of this; re-titled this bug to reflect that. Created AllowTypedData. Changed to ProposalRequired.

-- PaulHarvey - 10 Aug 2011

Removed SolrPlugin from "Components" as it solved the problem otherwise.

-- MichaelDaum - 21 Sep 2015
 

ItemTemplate edit

Summary Allow typed data from DataForms, Foswiki::Form, registerMETA
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Engine
Component BibtexFormfieldPlugin, DBIStoreContrib, FoswikiFunc, FoswikiMeta, ListFormfieldPlugin, MongoDBPlugin, SEARCH, SemanticLinksPlugin
Priority Enhancement
CurrentState Proposal Required
WaitingFor
Checkins
TargetRelease minor
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r7 - 21 Sep 2015, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy