Thursday 07 October 2010 4:26:29 pm
Hi everyone, I have the following folder structure in my current project.
"
Category Structure
--Business & Economics [B001]
----Green Business [B002]
----Development [B003] ----General [B004]
"
The folders marked with the [B00 ...] numbers are reverse related to one of more objects of the same custom content class (product). The products have an attribute called 'categories' which is a object relations. When I tried to do a subcategory search using ezfind and subtree limitations I wasn't able to get any results e.g. the reverse related objects. (If anyone has a clue why that'd be great too)
Now I'm trying to get the search results by approaching it all from 'the other end' using a filtered search in the same way mentioned in the last comment here: http://share.ez.no/forums/extensions/ez-find/content-ezfind-search-and-extended-attribute-filter#comment55276 In my case this looks something like this:
"
fetch( ezfind, search, hash( query, 'World', subtree_array, array( 93 ),
'filter', array( 'or',
array( 'product/categories:Business & Economics \[B001\]')
array( 'product/categories:Green Business \[B002\]')
array( 'product/categories:Development \[B003\]')
array( 'product/categories:General \[B004\]')
) ))
"
This search actually returns me any products located in the sub category folders, however it also returns other products that belong to a category that shares a similar name. For example I would get products shown that belong to the category 'Childhood Development [C021]' or 'Green Living [G033]'.
If I understand this correctly is seems like ezfind/Solr is tokenizing the names of the categories for indexing/searching which results in false positives beind returned. I then tried the following modification, encapsulating the whole category name in double quotes:
"
fetch( ezfind, search, hash( query, 'World', subtree_array, array( 93 ),
'filter', array( 'or',
array( 'product/categories:"Business & Economics [B001]"')
array( 'product/categories:"Green Business [B002]"')
array( 'product/categories:"Development [B003]"')
array( 'product/categories:"General [B004]"')
) ))
"
This however results in nothing being returned at all. I'm not sure why, since these would be exact matches on the category names.
From what I can see it seems to be that the tokenizing of the category names is what I need to fix to get this working correctly, but I have run out of ideas of where to look for configuration.
I've tried different settings for DatatypeMap[ezobjectrelationlist]=string in ezfind.ini and re-indexing with --clean afterwards, but none of that seems to make a change in terms of my search results. Any pointers/ideas in regards to this would be much appreciated. I'm using eZ Publish 4.2.0 and eZ Find 2.1 btw.
Kind regards, Ben
|