[Zope-CVS] CVS: Products/FieldedTextIndex - CHANGES.txt:1.4
README.txt:1.6 version.txt:1.3
Casey Duncan
casey at zope.com
Mon Jan 19 23:59:26 EST 2004
Update of /cvs-repository/Products/FieldedTextIndex
In directory cvs.zope.org:/tmp/cvs-serv20432
Modified Files:
CHANGES.txt README.txt version.txt
Log Message:
Update docs and bump version #
=== Products/FieldedTextIndex/CHANGES.txt 1.3 => 1.4 ===
--- Products/FieldedTextIndex/CHANGES.txt:1.3 Mon Jan 12 01:09:42 2004
+++ Products/FieldedTextIndex/CHANGES.txt Mon Jan 19 23:59:25 2004
@@ -1,10 +1,18 @@
FieldTextIndex Changelog
- 0.2
+ 1/19/2003 - 0.2 Release
+
+ **Indexes made with version 0.1 of FieldedTextIndex cannot be used with
+ version 0.2. You must recreate your indexes after upgrading to 0.2**
- Added support to weight results differently depending on the field
matched using the 'field_weights' query keyword. Thanks to
Jean-Francois Doyon for suggesting the feature.
+
+ - Default weights can now be supplied for the index using through the ZMI.
+
+ - Totally refactored searching and scoring algorithm to efficiently handle
+ arbitrarily weighted fields.
12/27/2003 - 0.1 Release
=== Products/FieldedTextIndex/README.txt 1.5 => 1.6 ===
--- Products/FieldedTextIndex/README.txt:1.5 Mon Jan 12 01:09:42 2004
+++ Products/FieldedTextIndex/README.txt Mon Jan 19 23:59:25 2004
@@ -4,6 +4,9 @@
indexer for Zope. As such, it has many of the same features such as
relevance ranking, boolean queries, wildcards (globbing) and phrase matching.
+ **Note:** -- Indexes made with version 0.1 of FieldedTextIndex cannot be
+ used with version 0.2. You must recreate your indexes after upgrading to 0.2
+
What problems does it solve?
In Zope sites it is common to have many different types of content objects
@@ -41,6 +44,11 @@
queries to be performed across all fields (like a standard text index) or
any subset of the fields which have been encountered in the objects
indexed.
+
+ Additionally, FieldedTextIndex can weight individual fields so that
+ search terms found in those fields affect the result score differently.
+ This allows you to make certain fields influence the relevance of results
+ more or less than others.
Creating a FieldedTextIndex
@@ -119,7 +127,7 @@
This would return only objects where the query terms occurred in the
fields 'Title' or 'Description'.
- Specifying field weights (New in 0.2)
+ Specifying field weights in queries (New in 0.2)
It is also possible to weight individual fields differently in a query so
that hits on certain fields affect the relevance score more than others. In
@@ -136,23 +144,19 @@
result = catalog(dc_fields={"query":"Some search string",
"field_weights":{"Title":3,
- "Description":1,
"Subject":2}})
- This would return objects where the query is matched by the 'Title',
- 'Description' or 'Subject' fields. Matches on 'Title' have their score
- multiplied by 3. 'Description' and 'Subject' matches are multiplied by
- 2 and 1 respectively.
-
- You can specify 'field_weights' with or without also specifying 'fields'.
- If you specify 'field_weights' without 'fields', then the search is
- limited to the fields in 'field_weights'. If you also specify 'fields', then
- all fields specified by it are searched, regardless of which fields appear
- in 'field_weights'. Fields named in 'fields' but not 'field_weights'
- are automatically assigned a weight value of one. Fields in 'field_weights'
- that do not appear in 'fields' are ignored. This allows your application
- to have 'field_weights' globally configured while still varying the fields
- actually searched in different queries::
+ This would return objects where the query is found in any field. Matches
+ on 'Title' have their score multiplied by 3. 'Subject' matches are
+ multiplied by 2.
+
+ You can specify 'field_weights' independently of 'fields'. The value of
+ 'field_weights' does not affect the fields searched. If 'fields' is not
+ specified, then all fields are searched regardless of the value of
+ 'field_weights'. Fields not assigned a weight by 'field_weights' are
+ assigned a weight of one by default. If you specify weights for fields
+ that do not appear in the 'fields' list or are not the names of fields
+ known to the index, they are ignored::
result = catalog(dc_fields={"query":"Some search string",
"fields":["Title", "Description"],
@@ -162,6 +166,27 @@
In this case, 'Title' is searched with a weight of 3 and 'Description'
a weight of 1 (the default). 'Subject' is not searched since it does not
appear in 'fields'.
+
+ You can also specify zero or negative weights if desired. Zero weighted
+ fields will be used to filter the results, but will not affect the score.
+ Negatively weighted fields will reduce the score of results where terms
+ occur in them. This can be used as a way to tweak the order of results
+ to common queries. If undesired content is appearing high in the results
+ of a query, a negatively weighted field with anti-keywords matching
+ the query could be used to move the content down.
+
+ Specifying default weights
+
+ You can also specify weights to apply by default to all queries that do
+ not specify a value for 'field_weights'. To do this, go to the 'Indexes'
+ tab of the ZCatalog and click on the FieldedTextIndex. Use the
+ 'Default Field Weights' tab to set the defaults for the index. Weights
+ are applied at query-time, so you do not need to reindex for the weights
+ to take affect.
+
+ Queries that specify their own value for 'field_weights' override any
+ defaults. Queries can pass an empty dictionary for 'field_weights' to
+ reset all field weights to one.
Creating a query form
=== Products/FieldedTextIndex/version.txt 1.2 => 1.3 ===
--- Products/FieldedTextIndex/version.txt:1.2 Mon Jan 12 01:09:42 2004
+++ Products/FieldedTextIndex/version.txt Mon Jan 19 23:59:25 2004
@@ -1 +1 @@
-0.2a
+0.2
More information about the Zope-CVS
mailing list