From 1aac76e1431d796c1df1cabd0124d3dbb174e750 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 16 Jul 2007 12:55:09 +0100 Subject: scope in matches of individual documents where AND is used as text matching criteria --- CHANGELOG | 18 +++++++++++++++--- lib/sisu/v0/cgi_pgsql.rb | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9c4cafd0..518b0640 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,11 +6,23 @@ Reverse Chronological: %% STABLE MANIFEST +%% sisu_0.55.4.orig.tar.gz (2007-07-21:29/6) +http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.4.orig.tar.gz + sisu_0.55.4.orig.tar.gz + sisu_0.55.4-1.dsc + sisu_0.55.4-1.diff.gz + + * db import, minor refactor + + * cgi fixes + * search form pre/next + * scope for matches in individual documents + %% sisu_0.55.3.orig.tar.gz (2007-07-14:28/6) http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz - sisu_0.55.3.orig.tar.gz - sisu_0.55.3-1.dsc - sisu_0.55.3-1.diff.gz + d540a4f656393449c5f4ad5b7a5b5245 1267096 sisu_0.55.3.orig.tar.gz + a0c2e3c6ab5e59c9e675ae48ed2582cb 606 sisu_0.55.3-1.dsc + 9e0ae70f83fa29c10aaf8a9626aaed8e 142063 sisu_0.55.3-1.diff.gz * url * matching improved diff --git a/lib/sisu/v0/cgi_pgsql.rb b/lib/sisu/v0/cgi_pgsql.rb index b3a7a82b..d4c620a5 100644 --- a/lib/sisu/v0/cgi_pgsql.rb +++ b/lib/sisu/v0/cgi_pgsql.rb @@ -173,7 +173,7 @@ module SiSU_CGI_pgsql #% search[:text].each{|x| @search_text << "#{x} AND " } @search_text=@search_text.to_s.gsub!(/AND\s+$/,'') - @search_text.gsub!(/(documents\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+documents\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)') + @search_text.gsub!(/(documents\.clean~[*]?\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+documents\.clean~[*]?\(\s*'[^']+'\s*\))+)/,'(\1)') search[:endnotes].each{|x| @search_endnotes << "#{x} AND " } @search_endnotes=@search_endnotes.to_s.gsub!(/AND\s+$/,'') @search_endnotes.gsub!(/(endnotes\.clean~\(\s*'[^']+'\s*\)\s+(?:(?:AND|OR)\s+endnotes\.clean~\(\s*'[^']+'\s*\))+)/,'(\1)') -- cgit v1.2.3