Forums / Extensions / eZ Find / moreLikeThis results and attribute filtering

moreLikeThis results and attribute filtering

Author Message

Sergey Gedeon

Thursday 17 February 2011 4:38:10 am

Hi all!

I'm using attribute filtering for the moreLikeThis fetch:

{def $mlt_results = fetch( 'ezfind', 'moreLikeThis', hash( 'query_type', 'nid',
                            'query', $node.node_id,
                            'limit', 5,
                            'class_id', array('article'),
                            'filter', array( 'article/category: ( "Value1" OR "Value2" )' ) ) ).SearchResult}

and I have 4 articles with the same values of 'category' attribute (Selection with multiple choice)

But only for one article this fetch returns some data...

The SOLR index is updated with the '--clean' option.

Anybody know how works 'mlt' search and why the same query returns different results for the similar pages?

---------------------------------------
To Live Is To Die...
To Die Is To Wake...

Paul Borgermans

Monday 21 February 2011 2:06:58 pm

Hello Sergey

the "more like this" fetch works on some heuristics: it first extracts the "most relevant terms" of the article specified with the node id. It then performs a search with those terms, taking into account any other filter specified.

This is not bullet proof when looking as a human being at the content, so yes, results may seem to be inconsistent with your expectation across "similar" documents.

Are you on ezfind 2.3? I can provide a patch to show the "interesting terms" used, and which may clarify for you the results you see. You can also tune this to some extent

Regards

Paul

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

Sergey Gedeon

Monday 21 February 2011 3:14:23 pm

The eZFind 2.2 is used for this project.

And now we use plain ezfind search fetches instead of moreLikeThis (there is one nice parameter to exclude current node from the results).

This way is not so flexible but it partially solves our problem (search the nodes with the same attributes as for the current node)! :) Maybe the results are not most relevant, but still relevant!

---------------------------------------
To Live Is To Die...
To Die Is To Wake...

eZ debug

Timing: Jan 29 2025 13:38:43
Script start
Timing: Jan 29 2025 13:38:43
Module start 'content'
Timing: Jan 29 2025 13:38:43
Module end 'content'
Timing: Jan 29 2025 13:38:43
Script end

Main resources:

Total runtime0.2834 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.0080 588.1094180.7656
Module start 'content' 0.00810.0058 768.875099.0547
Module end 'content' 0.01390.2695 867.9297528.4063
Script end 0.2834  1,396.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00341.2023200.0002
Check MTime0.00140.4996200.0001
Mysql Total
Database connection0.00080.281510.0008
Mysqli_queries0.238884.26221410.0017
Looping result0.00120.42231390.0000
Template Total0.268994.910.2689
Template load0.00100.349710.0010
Template processing0.267994.525610.2679
Override
Cache load0.00070.235010.0007
Sytem overhead
Fetch class attribute can translate value0.00080.282510.0008
XML
Image XML parsing0.00020.081910.0002
General
dbfile0.00602.1213200.0003
String conversion0.00000.001930.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