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...