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.

eZ debug

Timing: Jan 31 2025 04:15:20
Script start
Timing: Jan 31 2025 04:15:20
Module start 'layout'
Timing: Jan 31 2025 04:15:20
Module start 'content'
Timing: Jan 31 2025 04:15:20
Module end 'content'
Timing: Jan 31 2025 04:15:20
Script end

Main resources:

Total runtime0.0193 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.2891151.2266
Module start 'layout' 0.00670.0031 739.515636.6797
Module start 'content' 0.00980.0077 776.195398.1875
Module end 'content' 0.01740.0018 874.382837.9922
Script end 0.0193  912.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.3075140.0002
Check MTime0.00125.9623140.0001
Mysql Total
Database connection0.00136.567310.0013
Mysqli_queries0.002613.428530.0009
Looping result0.00000.176610.0000
Template Total0.00147.310.0014
Template load0.00115.468410.0011
Template processing0.00041.833510.0004
Override
Cache load0.00063.294210.0006
General
dbfile0.002915.123780.0004
String conversion0.00000.045740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs