Substring search

Author Message

Gabriel Ambuehl

Tuesday 18 January 2005 11:53:32 am

Is there any way I can enable substring searches? This is a major deal in German which uses loads of concatenated nouns but also in other languages and with lazy users. This shouldn't be too hard (might be as simple as changing WHERE field='keyword' clauses to WHERE field like '%keyword%' to do...

Also, how about soundex searches / different spellings of the same word, but that's obviously a lot harder than substring searches ;-)

Visit http://triligon.org

Jo Havik

Wednesday 19 January 2005 5:15:36 am

There is no easy way to search for substrings (at least as I know :). The '%keyword%' approach does not work since the structure of the search engine cannot cope with the possibility of a SQL query returning more than one word (an exact match). Cannot remember the details, havent looked at this for some time.

We have, however, created a patched version of the search engine (for eZ publish v. 3.4) that indexes substrings of each word. This works, but your database will grow quite large..

Let me know if you want me to send this patch to you.

Jo H

--
Jo Havik / jo.havik at bodonihus.no

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 18 2025 22:39:27
Script start
Timing: Jan 18 2025 22:39:27
Module start 'layout'
Timing: Jan 18 2025 22:39:27
Module start 'content'
Timing: Jan 18 2025 22:39:27
Module end 'content'
Timing: Jan 18 2025 22:39:27
Script end

Main resources:

Total runtime0.5164 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 587.7891152.6094
Module start 'layout' 0.00410.0025 740.398439.4063
Module start 'content' 0.00660.5084 779.8047484.1875
Module end 'content' 0.51500.0013 1,263.99228.1953
Script end 0.5163  1,272.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00280.5328160.0002
Check MTime0.00120.2276160.0001
Mysql Total
Database connection0.00050.105210.0005
Mysqli_queries0.482093.3489540.0089
Looping result0.00050.0899520.0000
Template Total0.493695.620.2468
Template load0.00160.304120.0008
Template processing0.492195.295820.2460
Template load and register function0.00010.024210.0001
states
state_id_array0.00070.131510.0007
state_identifier_array0.00070.132520.0003
Override
Cache load0.00120.2377100.0001
Sytem overhead
Fetch class attribute can translate value0.00070.128220.0003
Fetch class attribute name0.00150.283020.0007
XML
Image XML parsing0.00020.046320.0001
class_abstraction
Instantiating content class attribute0.00000.001520.0000
General
dbfile0.00060.1183100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 6
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs