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

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

eZ debug

Timing: Jan 18 2025 02:56:15
Script start
Timing: Jan 18 2025 02:56:15
Module start 'content'
Timing: Jan 18 2025 02:56:15
Module end 'content'
Timing: Jan 18 2025 02:56:15
Script end

Main resources:

Total runtime0.1337 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.5391181.5547
Module start 'content' 0.00790.0058 771.0938103.6250
Module end 'content' 0.01370.1199 874.7188536.2969
Script end 0.1336  1,411.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.6761200.0002
Check MTime0.00141.0316200.0001
Mysql Total
Database connection0.00080.593910.0008
Mysqli_queries0.089466.84921410.0006
Looping result0.00110.85631390.0000
Template Total0.119589.410.1195
Template load0.00090.636610.0009
Template processing0.118788.792610.1187
Override
Cache load0.00060.452510.0006
Sytem overhead
Fetch class attribute can translate value0.00090.710610.0009
XML
Image XML parsing0.00040.270710.0004
General
dbfile0.00463.4496200.0002
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs