Why does LiveSearch return all entries, and Search returns nothing?
Up to Table of ContentsThis FAQ applies to: Plone 2.1.x
This is caused by a bug in Plone 2.1.0.
When performing certain operations, such as:
- importing a site from a
.zexpfile via the ZMI - renaming a Plone site
- or migrating from an earlier version
some entries can get lost from the portal_catalog, causing strange behaviors, such as
- LiveSearch returns all items on the site, regardless of what you type in the search box.
- Clicking on "Search" after entering text in the search box returns no results, even though LiveSearch returned lots of results.
To see if this affects you:
- Via the ZMI, visit portal_catalog in the root of your site.
- Click on Indexes in the tabs along the top.
- If you don't have Description, SearchableText or Title indexes, you probably have this problem.
To fix the problem:
From the Indexes tab, add 3 indexes:
- A
ZCTextIndex, with the following values:- id
- Description
- Indexed attributes
- Description
- Ranking Strategy
- Okapi BM25 Rank
- Lexicon
- plone_lexicon
- A
ZCTextIndex, with the following values:- id
- SearchableText
- Indexed attributes
- leave blank
- Ranking Strategy
- Okapi BM25 Rank
- Lexicon
- plone_lexicon
- A
ZCTextIndex, with the following values:- id
- Title
- Indexed attributes
- Title
- Ranking Strategy
- Okapi BM25 Rank
- Lexicon
- plone_lexicon
Then, reindex these three new indexes.