I am trying to use printRelatedItems on an image page, to display similar images.
I find it very difficult to display relevant images. The more tags there are, the less relevant the results (which is the contrary of what we would expect)
I think this is due to this part of the code
`
foreach ($tags as $tag) {
$count++;
if ($count ==1) {
$bool = '';
} else {
$bool = '|'; // connect tags by OR to get a wide range
}
`
In order to get relevant results, we should only connect tags by OR if there are three tags or less.
I tested this and it seems to give better relevance
`
foreach ($tags as $tag) {
$count++;
if ($count
) {<br />
$bool = '|';
} else {
$bool = ''; // narrow the search to relevant tags
}
`
Do you think you could change this in the plugin?
Another problem is that the search results tend to always be displayed in the same order. So if you use rather generic tags on lots of images, you end up with the same array of images displayed every time.
Would there be a way to randomize the order of search results?
Anyway, trying this made me realize I had a lot of work to do on tagging, especially if I want to link the images based on common topics.
Comments
The order of search results in general can be set via options. Additionally you can use the object model to do this directly via your theme, too. I don't think that general randomizing is of general use as you want a kind of relevance normally.