eZFind 2.0 - exclude authors from search

Author Message

Mirko Battisti

Monday 17 August 2009 12:08:04 am

Hello everybody.

Is there a way to avoid content authors to be indexed by eZFind?
I've looked everywhere in the config files, but I can't seem to find anything.
What I would like to avoid is result to show up if someone inputs the author name/surmane in the search field. It looks like solr gets the author name and surname and puts them into the 'meta_owner_name_t' field.
Any idea?
Thanks!
Mirko.

Mark Marsiglio

Sunday 23 August 2009 7:05:33 pm

I think that this would require the metafield indexboost feature (not implemented in 2.0) to put an indexboost factor of 0.0.

I have not been able to find out yet if this feature will be implemented in 2.1

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Fabien Mas

Tuesday 17 November 2009 3:05:14 am

Hi,

The only way I found was to hack the ..\extension\ezfind\classes\ezfezpsolrquerybuilder.php file

Line 223, comment this line:

// $queryFields[] = eZSolr::getMetaFieldName( 'owner_name' );

Bertrand Dunogier

Tuesday 17 November 2009 3:27:50 am

If there was no other way, you could submit an enhancement request for this on http://issues.ez.no/ezfind.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Paul Borgermans

Tuesday 17 November 2009 1:29:28 pm

The use cases I encountered so far typically want this as a "user" site access feature; while still wanting it in the admin interface or when creating own dedicated search templates

What is yours here?

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

Nicolas Jessel

Friday 20 November 2009 6:38:43 am

Hello,

To have generic solution, we can do this in ezfind.ini.append.php file:

[SiteSettings]
## PATCH NJESSEL - 20091120
## Parameter to display or not owner results
## when owner name is enter in search engine
## value = enabled or disabled
## test add in ezfezpsolrquerybuilder.php in buildSearch() method
## if ( self::$FindINI->variable( 'SiteSettings', 'SearchOwnerResults' ) == 'enabled' )
## $queryFields[] = eZSolr::getMetaFieldName( 'owner_name' );
SearchOwnerResults=disabled

Like that, we can display, or not, results in each siteaccess

Bye.

Bertrand Dunogier

Saturday 21 November 2009 4:14:49 am

Your approach ain't bad, Nicolas. But don't you think it's a bit limiting ?

You could first make the setting an array, maybe with a default global value, so that you can configure this behaviour by class. Ultimately, it would also be very interesting to make this a possible per class search parameter. So that you can enable author lookup for class A, but disable it for class B.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Paul Borgermans

Saturday 21 November 2009 7:11:11 am

@Bertrand: doing such queries with variations per class would need nesting of queries (and quite a different API in the fetch functions)

A possible solution (using boost functions) suffers from a bug I'll address later this weekend, I'll implement it with the newer Solr 1.4 syntax as well

Paul

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

Bertrand Dunogier

Saturday 21 November 2009 11:21:25 am

Nesting of queries... you mean a few boolean operators, right ? :)

It is indeed more complex than what Nicolas proposed, but I don't think it requires a very heavy change.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Paul Borgermans

Saturday 21 November 2009 12:24:45 pm

@Bertrand: no I don't mean "a few boolean operators", that would not work at all

I mean Solr nested queries, a new feature since 1.4

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

Andrew Duck

Sunday 19 September 2010 7:12:17 pm

Hi Paul,

Any recent improvements on this?

Andrew Duck, Executive Director, Quiqcorp Limited
eZ Certified Developer and Trainer.
Member of the Community Project Board
http://quiqcorp.com | http://twitter.com/andrewduck

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 30 2025 00:45:34
Script start
Timing: Jan 30 2025 00:45:34
Module start 'layout'
Timing: Jan 30 2025 00:45:34
Module start 'content'
Timing: Jan 30 2025 00:45:34
Module end 'content'
Timing: Jan 30 2025 00:45:34
Script end

Main resources:

Total runtime0.0160 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.0060 589.4141151.2266
Module start 'layout' 0.00600.0042 740.640636.6797
Module start 'content' 0.01030.0046 777.3203107.4844
Module end 'content' 0.01480.0012 884.804745.9922
Script end 0.0160  930.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002012.6638140.0001
Check MTime0.00095.6627140.0001
Mysql Total
Database connection0.00053.308210.0005
Mysqli_queries0.005131.808730.0017
Looping result0.00000.087610.0000
Template Total0.00095.810.0009
Template load0.00074.374810.0007
Template processing0.00021.388910.0002
Override
Cache load0.00042.791210.0004
General
dbfile0.00021.423180.0000
String conversion0.00000.047540.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