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
9319c8e0
Commit
9319c8e0
authored
May 16, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename the Index classes to OkapiIndex and CosineIndex, respectively.
parent
025db164
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/python/Products/ZCTextIndex/ZCTextIndex.py
lib/python/Products/ZCTextIndex/ZCTextIndex.py
+2
-2
lib/python/Products/ZCTextIndex/tests/mhindex.py
lib/python/Products/ZCTextIndex/tests/mhindex.py
+2
-2
No files found.
lib/python/Products/ZCTextIndex/ZCTextIndex.py
View file @
9319c8e0
...
@@ -27,7 +27,7 @@ from Products.PluginIndexes.common.PluggableIndex \
...
@@ -27,7 +27,7 @@ from Products.PluginIndexes.common.PluggableIndex \
import
PluggableIndexInterface
import
PluggableIndexInterface
from
Products.PluginIndexes.common.util
import
parseIndexRequest
from
Products.PluginIndexes.common.util
import
parseIndexRequest
from
Products.ZCTextIndex.OkapiIndex
import
Index
from
Products.ZCTextIndex.OkapiIndex
import
Okapi
Index
from
Products.ZCTextIndex.ILexicon
import
ILexicon
from
Products.ZCTextIndex.ILexicon
import
ILexicon
from
Products.ZCTextIndex.Lexicon
\
from
Products.ZCTextIndex.Lexicon
\
import
Lexicon
,
Splitter
,
CaseNormalizer
,
StopWordRemover
import
Lexicon
,
Splitter
,
CaseNormalizer
,
StopWordRemover
...
@@ -47,7 +47,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
...
@@ -47,7 +47,7 @@ class ZCTextIndex(Persistent, Acquisition.Implicit, SimpleItem):
query_options
=
[
'query'
]
query_options
=
[
'query'
]
def
__init__
(
self
,
id
,
extra
,
caller
,
index_factory
=
Index
):
def
__init__
(
self
,
id
,
extra
,
caller
,
index_factory
=
Okapi
Index
):
self
.
id
=
id
self
.
id
=
id
self
.
_fieldname
=
extra
.
doc_attr
self
.
_fieldname
=
extra
.
doc_attr
lexicon
=
getattr
(
caller
,
extra
.
lexicon_id
,
None
)
lexicon
=
getattr
(
caller
,
extra
.
lexicon_id
,
None
)
...
...
lib/python/Products/ZCTextIndex/tests/mhindex.py
View file @
9319c8e0
...
@@ -22,7 +22,7 @@ from BTrees.IOBTree import IOBTree
...
@@ -22,7 +22,7 @@ from BTrees.IOBTree import IOBTree
from
BTrees.OIBTree
import
OIBTree
from
BTrees.OIBTree
import
OIBTree
from
Products.ZCTextIndex.NBest
import
NBest
from
Products.ZCTextIndex.NBest
import
NBest
from
Products.ZCTextIndex.OkapiIndex
import
OkapiIndex
as
Index
from
Products.ZCTextIndex.OkapiIndex
import
OkapiIndex
from
Products.ZCTextIndex.Lexicon
import
Lexicon
,
Splitter
from
Products.ZCTextIndex.Lexicon
import
Lexicon
,
Splitter
from
Products.ZCTextIndex.Lexicon
import
CaseNormalizer
,
StopWordRemover
from
Products.ZCTextIndex.Lexicon
import
CaseNormalizer
,
StopWordRemover
from
Products.ZCTextIndex.QueryParser
import
QueryParser
from
Products.ZCTextIndex.QueryParser
import
QueryParser
...
@@ -382,7 +382,7 @@ class TextIndex(Persistent):
...
@@ -382,7 +382,7 @@ class TextIndex(Persistent):
def
__init__
(
self
):
def
__init__
(
self
):
self
.
lexicon
=
Lexicon
(
Splitter
(),
CaseNormalizer
(),
StopWordRemover
())
self
.
lexicon
=
Lexicon
(
Splitter
(),
CaseNormalizer
(),
StopWordRemover
())
self
.
index
=
Index
(
self
.
lexicon
)
self
.
index
=
Okapi
Index
(
self
.
lexicon
)
def
index_text
(
self
,
docid
,
text
):
def
index_text
(
self
,
docid
,
text
):
self
.
index
.
index_doc
(
docid
,
text
)
self
.
index
.
index_doc
(
docid
,
text
)
...
...
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