Potential BC break for subattribute fields in eZ Find 2.3: input requested

Author Message

Paul Borgermans

Wednesday 16 June 2010 3:16:27 am

While field names in Solr are in principle fully unicode, there are some areas where hyphens (or dash '-') pose problems. This is used in particular with subattribute field names.

I want to change this convention and replace the hyphen with an underscore ('_').

Apart from a re-index need, this will break cases where you use hardcoded fields names in templates for example when using subattribute filtering.

I would like to have an idea how many of you use hard coded subattribute fields and your comments on this change

Regards

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Nicolas Pastorino

Wednesday 16 June 2010 3:34:28 am

Hi Paul and thanks for polling the community !

My two cents on the topic : The "-" (hyphen) separator was chosen to make a visual difference from the other separator used by eZ Find when building Solr field names : "_" (underscore). This helps a lot any developer to identify/qualify a field's origin, namely when reading direct outputs from Solr (console, Solr admin).

In short, having two different separators adds, in my opinion, a valuable semantic nuance, and i'd recommend choosing another, Solr-compliant character than "_" for this purpose.

Cheers,

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Paul Borgermans

Wednesday 16 June 2010 4:12:01 am

The point is to avoid special characters which are actually also part of the lucene query syntax:

+ - && || ! ( ) { } [ ] ^ " ~ * ? : \

An alternatve is to use a pattern with multiple characters to aid human readability

For example

 _SUB_

as a separator

More thoughts?

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Ivo Lukac

Wednesday 16 June 2010 6:36:58 am

We have one project using this feature, put it will not be a problem to upgrade :)

Cheers.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Paul Borgermans

Wednesday 16 June 2010 1:41:19 pm

ok, last chance to influence me:

what about '___' which are three consecutive underscores?

examples:

submeta_related_article___class_name_s

subattr_related_article___body_t

Is that clear enough to see the attribute and subattribute identifiers?

Regards

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

gilles guirand

Wednesday 16 June 2010 7:50:07 pm

Enjoy the three consecutive underscores !

--
Gilles Guirand
eZ Community Board Member
http://twitter.com/gandbox
http://www.gandbox.fr

Nicolas Pastorino

Wednesday 16 June 2010 11:40:30 pm

"

Enjoy the three consecutive underscores !

"

+1

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 05:09:41
Script start
Timing: Jan 18 2025 05:09:41
Module start 'layout'
Timing: Jan 18 2025 05:09:41
Module start 'content'
Timing: Jan 18 2025 05:09:41
Module end 'content'
Timing: Jan 18 2025 05:09:41
Script end

Main resources:

Total runtime0.6078 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.4375152.6875
Module start 'layout' 0.00650.0047 741.125039.5547
Module start 'content' 0.01120.5951 780.6797685.1328
Module end 'content' 0.60630.0015 1,465.812520.0547
Script end 0.6077  1,485.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.5926160.0002
Check MTime0.00160.2581160.0001
Mysql Total
Database connection0.00140.230710.0014
Mysqli_queries0.527386.7569750.0070
Looping result0.00080.1318730.0000
Template Total0.564492.920.2822
Template load0.00230.384220.0012
Template processing0.562092.468920.2810
Template load and register function0.00010.018410.0001
states
state_id_array0.00200.336110.0020
state_identifier_array0.00150.238720.0007
Override
Cache load0.00200.3326460.0000
Sytem overhead
Fetch class attribute can translate value0.00100.159140.0002
Fetch class attribute name0.00120.1928110.0001
XML
Image XML parsing0.00220.356240.0005
class_abstraction
Instantiating content class attribute0.00000.0047140.0000
General
dbfile0.00130.2186370.0000
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs