Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
169f5a22
Commit
169f5a22
authored
Jan 29, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added copyrights
parent
7b598491
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
541 additions
and
491 deletions
+541
-491
lib/python/SearchIndex/Index.py
lib/python/SearchIndex/Index.py
+235
-216
lib/python/SearchIndex/TextIndex.py
lib/python/SearchIndex/TextIndex.py
+306
-275
No files found.
lib/python/SearchIndex/Index.py
View file @
169f5a22
##############################################################################
#
# Copyright
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved.
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__
=
'''Simple column indexes
$Id: Index.py,v 1.16 1998/12/14 16:32:55 jeffrey Exp $'''
__version__
=
'$Revision: 1.16 $'
[
11
:
-
2
]
"""Simple column indices"""
__version__
=
'$Revision: 1.17 $'
[
11
:
-
2
]
from
Globals
import
Persistent
from
BTree
import
BTree
...
...
@@ -213,57 +286,3 @@ class Index(Persistent):
else
:
return
None
return
r
,
(
id
,)
##############################################################################
#
# $Log: Index.py,v $
# Revision 1.16 1998/12/14 16:32:55 jeffrey
# unique values listing now won't return empty strings
#
# Revision 1.15 1998/10/13 21:07:17 jeffrey
# added dpUniqueValues and dpHasUniqueValuesFor methods
#
# Revision 1.14 1998/02/25 22:38:34 jeffrey
# made the Index persistent, just as it should be
#
# Revision 1.13 1998/02/05 19:02:37 jim
# Replaced try/except with get
#
# Revision 1.12 1997/12/02 19:34:39 jeffrey
# fixed buglet in .clear() method
#
# Revision 1.11 1997/10/10 19:25:03 jeffrey
# fixed min:max buglet
#
# Revision 1.10 1997/10/10 18:34:56 jeffrey
# Added range searching/indexing
#
# Revision 1.9 1997/09/26 22:21:43 jim
# added protocol needed by searchable objects
#
# Revision 1.8 1997/09/23 16:46:48 jim
# Added logic to handle missing data.
#
# Revision 1.7 1997/09/17 18:58:08 brian
# Fixed a booboo in unindex_item
#
# Revision 1.6 1997/09/12 14:46:51 jim
# *** empty log message ***
#
# Revision 1.5 1997/09/12 14:18:04 jim
# Added logic to allow "blank" inputs.
#
# Revision 1.4 1997/09/10 21:46:18 jim
# Fixed bug that caused return of None when there were no matches.
#
# Revision 1.3 1997/09/10 17:25:26 jim
# Changed to use regular old BTree.
#
# Revision 1.2 1997/09/08 18:53:24 jim
# *** empty log message ***
#
# Revision 1.1 1997/09/08 18:52:04 jim
# *** empty log message ***
#
#
lib/python/SearchIndex/TextIndex.py
View file @
169f5a22
##############################################################################
#
# Copyright
# Zope Public License (ZPL) Version 0.9.4
# ---------------------------------------
#
# Copyright 1997 Digital Creations, L.C., 910 Princess Anne
# Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
# rights reserved.
# Copyright (c) Digital Creations. All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions in source code must retain the above
# copyright notice, this list of conditions, and the following
# disclaimer.
#
# 2. Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions, and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Any use, including use of the Zope software to operate a
# website, must either comply with the terms described below
# under "Attribution" or alternatively secure a separate
# license from Digital Creations.
#
# 4. All advertising materials, documentation, or technical papers
# mentioning features derived from or use of this software must
# display the following acknowledgement:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 5. Names associated with Zope or Digital Creations must not be
# used to endorse or promote products derived from this
# software without prior written permission from Digital
# Creations.
#
# 6. Redistributions of any form whatsoever must retain the
# following acknowledgment:
#
# "This product includes software developed by Digital
# Creations for use in the Z Object Publishing Environment
# (http://www.zope.org/)."
#
# 7. Modifications are encouraged but must be packaged separately
# as patches to official Zope releases. Distributions that do
# not clearly separate the patches from the original work must
# be clearly labeled as unofficial distributions.
#
# Disclaimer
#
# THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS ``AS IS'' AND
# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL DIGITAL CREATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
#
# Attribution
#
# Individuals or organizations using this software as a web site
# must provide attribution by placing the accompanying "button"
# and a link to the accompanying "credits page" on the website's
# main entry point. In cases where this placement of
# attribution is not feasible, a separate arrangment must be
# concluded with Digital Creations. Those using the software
# for purposes other than web sites must provide a corresponding
# attribution in locations that include a copyright using a
# manner best suited to the application environment.
#
# This software consists of contributions made by Digital
# Creations and many individuals on behalf of Digital Creations.
# Specific attributions are listed in the accompanying credits
# file.
#
##############################################################################
__doc__
=
'''Text Index
"""Text Index
Notes on a new text index design
...
...
@@ -125,10 +201,8 @@ Notes on a new text index design
overhead and storage/retrieveal times, as well as storeage
space.
$Id: TextIndex.py,v 1.11 1998/09/28 20:43:22 jim Exp $'''
__version__
=
'$Revision: 1.11 $'
[
11
:
-
2
]
"""
__version__
=
'$Revision: 1.12 $'
[
11
:
-
2
]
from
Globals
import
Persistent
import
BTree
,
IIBTree
...
...
@@ -624,46 +698,3 @@ stop_words=(
)
stop_word_dict={}
for word in stop_words: stop_word_dict[word]=None
##############################################################################
#
# $Log: TextIndex.py,v $
# Revision 1.11 1998/09/28 20:43:22 jim
# Fixed bug in searches on stop words.
#
# Revision 1.10 1998/02/05 19:02:09 jim
# Changed to use get method.
#
# Revision 1.9 1998/02/05 15:24:22 jim
# Got rid of most try/excepts.
#
# Revision 1.8 1997/12/02 19:36:19 jeffrey
# fixed bug in .clear() method
#
# Revision 1.7 1997/12/01 22:58:48 jeffrey
# Allow indexing of non-text fields
#
# Revision 1.6 1997/11/03 18:59:59 jim
# Fixed several bugs in handling query parsing and proximity search.
#
# Revision 1.5 1997/11/03 15:17:12 jim
# Updated to use new indexing strategy. Now, no longer store positions
# in index, but get them on demand from doc.
#
# Removed vestiges of InvertedIndex.
#
# Revision 1.4 1997/09/26 22:21:44 jim
# added protocol needed by searchable objects
#
# Revision 1.3 1997/09/17 17:53:32 jim
# Added unindex_item.
# This thing needs an overhaul; already. :-(
#
# Revision 1.2 1997/09/12 14:25:40 jim
# Added logic to allow "
blank
" inputs.
#
# Revision 1.1 1997/09/11 22:19:09 jim
# *** empty log message ***
#
#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment