eZ Community » Forums » Extensions » eZ Find » object relations & eZ Find 2.1
expandshrink

object relations & eZ Find 2.1

object relations & eZ Find 2.1

Friday 08 October 2010 1:26:29 am - 5 replies

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/categoriesbig-smile.gif Emoticonevelopment \[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

Modified on Sunday 17 October 2010 8:16:01 pm by Nicolas Pastorino

Monday 25 October 2010 1:00:08 am

Hi,

for ez find correctly dealing with object relation list is quite a challenge conceptually if taking into account various use cases (subattribute filtering for example).

I am working on a dedicated datatype handler that should suit your use case, stay tuned (or contact me directly for more info for the ongoing work)

Best regards

Paul

Modified on Monday 25 October 2010 1:01:11 am by Paul Borgermans

Monday 25 October 2010 1:19:58 pm

Hi,

Currently i have a similar case with eZ Find 2.2 in handling relation object list. Certainly your handler will be welcome.

Tuesday 26 October 2010 8:00:10 pm

Hi Paul,

thanks for the reply. It's great to hear that you're working on a handler to address this kind of use case, it is very much appreciated.

I'm sure such a handler would come in very useful for a lot of other people as well.

Thanks again,

Ben

Tuesday 26 October 2010 9:17:10 pm

You could try to code your own PHP Class, using this code exemple :

http://projects.ez.no/ezfsolrdocumentfieldobjectrelation/

Wednesday 31 August 2011 5:17:01 pm

What is the status on this?

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from