Searching subtrees only works for main locations?

Author Message

Linh Vu

Wednesday 16 August 2006 7:18:43 am

Hi all,

I'm using 3.8.3. The "Search from here", meaning searching the current subtree, only seems to work if the node/object containing the matched text has a main location under the current subtree.

If I'm not making any sense, my setup for this site is like this:

Books: Folder, like a pool of Book objects. I set this up so that I can easily do a CSV upload to this folder. All these Book objects have main location under this Books folder.

Then I add extra locations to those Book objects to other Folders: Primary, Secondary, Maths, English etc. One Book object can appear under many of these folders.

However, if I try a "Search From Here" under, say, Secondary, with SubTreeArray[] set to the node id of Secondary, I don't get any result. Only search under Books or Global (obvious) that I would get the right books.

Is it a limitation of ez search or am I doing it the wrong way? Thanks in advance for your inputs.

If I had more time, I would write less code.

Xavier Dutoit

Wednesday 16 August 2006 7:54:14 am

Hi,

Maybe the search from here takes into account only the main locations ? Try to change the main location to see if it makes a difference.

What I'd do in your case is:
1) create a new class "topic" (copy of folder)
2) add an enhanced object relation field "topic" in the book, that let you check the topics object (check box, class object).

Override the view full for topic to list the reverse related objects (ie the books that have checked this specific topic).

X+

http://www.sydesy.com

Xavier Dutoit

Wednesday 16 August 2006 7:54:57 am

P.S. Nice cat on your picture.

http://www.sydesy.com

Paul Borgermans

Wednesday 16 August 2006 8:17:28 am

Hi

Yes, this is a "feature" of the default search plugin. Feel free to post an enhancement request ;-)

In our lucene based plugin this is also the case for the released beta versions, but it will be possible to have alternate locations under your subtree which return valid hits in an upcoming release. The issue is to return the $node object with the alternate location(s) (yes there can be more than one in principle) ... but I'm working on that one too.

--paul

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

Linh Vu

Monday 21 August 2006 9:02:57 pm

Hi,

Thanks for your replies and sorry that I haven't replied back in a little while as I've been away.

Sounds good that the lucene search plugin will support this. :-) I'm testing that on a few sites and have been very impressed.

I think I'll post it as a feature request. ;-) It doesn't make sense to return 0 search result when users choose "search from here" or a folder to perform the search on, although the objects do appear under that folder.

I will probably need to rearrange the folders in my case then.

To Xavier: that's Dame Kierri, our family's cat, who owns this house. ;-)

Cheers,
Linh

If I had more time, I would write less code.

Patrice DUCLAUD

Thursday 24 August 2006 3:05:27 am

Hi all,

I've the same problem with eZp 3.6.10.
The use of subtree_array seems to be the problem. Without, search display all objects concerned with my request.

No solution now for me now ? ;-(

Patrice

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.