| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
|
| |
|
|
|
|
|
|
| |
many PHPDocs
some unused variables
some dynamically declared variables declared
|
|
|
|
|
| |
The existing function was difficult to follow. It worked when
adding a new tuple, but not in the most sensible manner.
|
|
|
|
| |
doesn't exist
|
| |
|
|
|
|
|
|
|
| |
Since a8dba4523d2ecd09dd69a68a36673eaf5c009c57 the search index didn't
properly index numeric words anymore, instead they were added as new
words to the word list each time they were indexed, leading to an
ever-increasing index size.
|
|\
| |
| | |
Php strict
|
| |
| |
| |
| | |
\!empty/empty/isset as appropriate
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code that is removed in this commit has either never been used
(listIndexLenghts) or was completely broken (cacheIndexDir) and was
introduced in the indexer rewrite in 2010. The idea of the rewrite was
to update the readdir cache after every index change instead of on demand.
What the code actually did was removing every updated index from the
cache as it used a wrong if condition. Simply fixing the condition
wouldn't fix the problem as then only updated indexes would be added to
the cache and furthermore the rewrite simply ignored the readdircache
setting. For now the safest solution seems to be removing the code. It
could be added again in a changed form in a future version.
|
|
|
|
|
| |
The suffix parameter is only for the word length in the word index and
not for the metadata index.
|
| |
|
|
|
|
|
| |
The new deletePageNoLock method is used by renamePage and avoids that
the index needs to be unlocked and locked again for deleting the page.
|
| |
|
|
|
|
|
|
| |
With these functions that search index can be updated after page moves
or mass metadata updates without the need to reindex the whole
page/wiki. These functions will be used by the new pagemove plugin.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This avoids problems with test cases that use the indexer and the PID
cache - the index is cleaned between test cases but the PID cache
wasn't cleaned. Now PHPUnit can unset the global $Indexer between test
cases.
|
|
|
|
|
|
| |
This avoids re-reading of the page index file for every getPID()-call by
using a simple FIFO cache, limited to 10 items. In idx_addPage() and the
functions that it calls getPID() is called 3 times for the same PID.
|
|
|
|
|
|
| |
This allows plugins to get the PID for a page and also to get the page
for a certain PID. That way plugins can build their own index that uses
numeric ids.
|
| |
|
| |
|
|
|
|
| |
This includes a test for the minlen parameter for metadata keys
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This fixes page deletion in the indexer and fixes a but where empty
lines were added to the _i.idx file of metadata for which no value was
set (harmless, and wasn't executed anyway).
|
|
|
|
|
|
| |
This move the check if the page doesn't exist anymore but is still in
the index before the check if the index needs to be updated as otherwise
deleted pages won't be deleted from the index.
|
|
|
|
|
|
| |
This increases the indexer version in order to force a rebuild of the
search index in order to "repair" the search index that might contain
uppercase words
|
|
|
|
|
|
| |
On certain PHP installations (it has been reproduced with PHP version
5.2.0-8+etch11) the indexer failed to lowercase words in the indexer
so the fulltext search was partially broken.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new rendering limit of currently 5 pages to the
p_get_metadata function. This means that in one request not more than 3
pages will be parsed/rendered. Pages for which the cache can be used
aren't counted. This should make the new cache modes safe to use and
should provide backwards compatibility while keeping the advantage of
rendering metadata on demand (i.e. imagine one included page out of 10
is updated, then the metadata for that page can be rendered, but when
you request a purge of the cache not 10 pages are rendered).
In this commit most of the changes to the p_get_first_heading function
are reverted and the title index is no longer used. This makes the first
heading functionality no longer depends on the search index of DokuWiki.
Maybe it can be added again later when the indexer provides a proper API
for getting metadata values for all or selected pages. The performance
of the p_get_first_heading function should be almost back to the
performance in Anteater as the simple cache of p_get_metadata is used
and also the limit of p_get_metadata is of course applied.
|
|
|
|
|
|
| |
With this test it should be possible to detect if the search index has
been corrupted by using Rincewind RC or a git version of the weeks
before the RC release.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug that is fixed here may have corrupted your search index in a way
that it produces wrong or missing results and won't be fixed
automatically. This occurs when you have deleted the last occurrence of
a word that has been on the last line of one of the word indexes. A
functionality for checking for a broken search index will be added.
The index can be fixed by deleting it completely (remove all .idx files
in data/index/) and recreating it using bin/indexer.php -c. The
searchindex plugin will be updated to be able to do the same, soon.
|
|
|
|
| |
FS#2242
|
|
|
|
| |
Metadata is rendered now in the indexer when it's cache is invalid.
|
|\ |
|
| | |
|
| | |
|
|/
|
|
| |
ugly underscores
|
|
|
|
|
| |
as discussed at
http://www.freelists.org/post/dokuwiki/tokenizer-cmd-in-indexer,1
|
| |
|
|
|
|
|
|
|
| |
This merges the INDEXER_PAGE_ADD and INDEXER_METADATA_INDEX events and
introduces the new string keys 'page', 'body' and 'metadata' in the
event data. All plugins that use INDEXER_PAGE_ADD need to be adjusted to
use the key 'page' instead of 0 and 'body' instead of 1.
|
| |
|
| |
|
| |
|
| |
|