Field rev_text_id is being retired as part of MCR Schema Migration.
Remove references to this field from the Postgres search queries.
Bug: T198341
Change-Id: Id3cbf853aacc06709f441a93248b55943097cd11
The most notable improvements I was able to fit into this patch can be
seen in the User class, as well as in AbstractRestriction.
Our documentation generator ignores the @const tag. It's not needed. Just
have a comment above a constant and it will show up in the generated
documentation.
Using @var is misleading because a constant is not a "variable". The type
of a constant is strictly derived from it's value. Documenting the type
typically does not provide useful information. Doxygen does not understand
the type, but ignores any @… tag and renders everything else as plain text.
I can split this patch if you prefer. Please tell me.
Change-Id: I8019ae45c049822cdc1768d895ea3e3216c6db5f
This was originally a global search and replace. I manually checked all
replacements and reverted them if (due to the lack of type hints) either
null (that would be 0 when counted) or a Countable object can end in the
variable or property in question.
Now this patch only touches places where I'm sure nothing can break.
For the sanity of the honorable reviewers this patch is exclusively touching
negated counts. You should not find a single `!== []` in this patch, that
would be a mistake.
Change-Id: I5eafd4d8fccdb53a668be8e6f25a566f9c3a0a95
Non-breaking change. Remaining uses are public interfaces (a constant, two
globals, a config sub-parameter, SQL queries, storage function names), one i18n
message key, and a whole lot of maintenance scripts with calls to the deprecated
function wfWaitForSlaves().
Change-Id: I6ee5ca92ccf6a80c08f53d9efe38ebb4b05064d7
When submiting using the 'go' feature of Special:Search (standard
usecase for autocomplete) a nearby title can be selected.
Unfortunately a fragment only title is considered valid, which
sends the user to Main_Page#searchterm.
Instead don't allow a search starting with # to trigger the go
feature.
Bug: T182452
Change-Id: I8ce3ce8633e23db41ae6eafb9996ca7294f8445a
In some functions MediaWikiServices::getInstance() was called twices or
in loops. Extract the variable to reduce calls.
Change-Id: I2705db11d7a9ea73efb9b5a5c40747ab0b3ea36f
Search engines support the sort parameter, it would be nice if we
could pass it to be rendered in the web ui. This avoids implementing
any ui, which can be done at a later time.
Bug: T195071
Change-Id: Id7bd35bd4259bb1f1f856933d279dbd6eddfa2e2
For ease of understanding, use the same technique for both
sides of the comparison. Follows-up c2a308075f.
Change-Id: I66475fd4baaa6ab7cd24ad884e9fe01a1cd30d9f
This should be handled internally by SearchEngine implementations.
Bug: T198860
Change-Id: Ifbfd0fcb81fcacf5228bd2ffcac7b80fca872b2a
Depends-On: I7d4ff9498fa1f4ea66835c634b8931f4c29993fb
These methods are very similar there should be no need to have
two differents way to extract the namespace prefix.
Bug: T198860
Change-Id: I22802278452559d35a3d8f6068549c1fef1a5e86
This method was introduced in 4115586000
to support the prefix URI param introduced by the InputBox extension.
There are no reasons that this logic is exposed to SearchEngine users
and should be handled internally by SearchEngine implementations
that supports it.
Previously the search query was updated, now the prefix param will passed
along using SpecialSearch::$extraParams.
Bug: T198318
Change-Id: I33518d3f3ddee741ff4f3b47eb4928009bea66d1
Depends-On: I67c7f1886dd6a2d07c12015e2711c138e9f140e9
The Language::truncate() function was split into
Language::truncateForVisual() (which measures characters) and
Language::truncateForDatabase() (which measures bytes) in 1.31, but
the patch which soft-deprecated Language::truncate() didn't actually
remove all the uses in the codebase. Replace most of those old uses
now, which should actually improve the situation for
non-latin-alphabet users who were getting unfairly squeezed in a
number of places.
Bug: T197492
Change-Id: I2291c69d9df17c1a9e4ab1b7d4cbc73bc51d3ebb
This mimics how full text works by silenty dropping results returned from
search that no longer exist. This could be because the search index is slightly
out of sync with reality, or the search engine could simply be broken.
Only silent from the users perspective. We maintain a count in statsd of
the number of titles dropped. This can be monitored over time to
recognize any increases.
Bug: T115756
Change-Id: I2f29d73e258cd448a14d35a2b4902a4fb6f61c68
Various code using the search engine shouldn't need to implement it's
own methods, such as over-fetching, to determine if there are more
results available. This should be knowledge internal to search that is
exposed by a boolean.
Change-Id: Ica094428700637dfdedb723b03f6aeadfe12b9f4
The funky iteration here was at best annoying. Switch
it over to an iterator based approach with appropriate
BC code to simulate the old iteration style.
Depends-On: I19a8d6621a130811871dec9335038797627d9448
Change-Id: I9fccda15dd58a0dc35771d3b5cd7a6e8b02514a0
The plan is to convert these methods into final, considering
it a removal under the deprecation policy. By making entry
points into the search engine final we provide a guaranteed
point where generic handling can be applied to all search engines.
The first use case for this generic handling is pushing pagination
via overfetch into the SearchEngine class instead of re-implementing
an overfetch in individual parts of the code that perform searches.
Change-Id: I3426d6a2f32d8b368b044b154e1cb70dac007c62
MySQL normally attempts to rank the results when performing a full-
text search. However, this behavior is disabled when using BOOLEAN
MODE. While BOOLEAN MODE is needed in the WHERE clause, the default
NATURAL LANGUAGE MODE can be used in an ORDER BY clause to reenable
ranking.
Bug: T192458
Change-Id: I09462c339432927efead58fb543a10aed2c53195
These comments do not add anything. I argue they are worse than having
no comments, because I have to read them first to understand they
actually don't explain anything. Removing them makes room for actual
improvements in the future (if needed).
Change-Id: Iee70aad681b3385e9af282d5581c10addbb91ac4
In phpcs.xml rename renamed sniffs and add the failing sniffs,
because now the whole sniff is no longer excluded.
Change-Id: If5b0bd16028761abc2c47ace9e97d37ad14bb36f
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case passing by reference
Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
For some varargs a variable name is added with suffix ,... as seen for
many other varargs
Some @param are swapped, because there are in the wrong order
Enable Sniff MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
Change-Id: I60fec6025bce824d5c67563ab7b65ad6cd628ad8
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".
Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
Work to support interleaved AB testing of search will display
interleaved results of two search configurations on the first page of
results, but standard results on all pages other than the first page.
This means that while 20 results may be requested, the next 'new' result
of the primary query may be at position 10. Allow the SearchResultSet
to declare what the new offset is.
Bug: T150032
Change-Id: I14c0c33249fcdb66f72f5966e2aa72781a34daee
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
Change-Id: I994d11e05f202b880390723e148d79c72cca29f0
Partially revert I61dc536 that broke phrase search support.
Fix phrase search by making explicit that there are two
kind of legalSearchChars() usecases :
- the chars allowed to be part of the search query (including special
syntax chars such as " and *). Used by SearchDatabase::filter() to
cleanup the whole query string (the default).
- the chars allowed to be part of a search term (excluding special
syntax chars) Used by search engine implementaions when parsing with
a regex.
For future reference:
Originally this distinction was made "explicit" by calling directly
SearchEngine::legalSearchChars() during the parsing stage. This was
broken by Iaabc10c by enabling inheritance.
This patch adds a new optional param to legalSearchChars to make this
more explicit.
Also remove the function I introduced in I61dc536 (I wrongly assumed
that the disctinction made between legalSearchChars usecases was due
to a difference in behavior between indexing and searching).
Added more tests to prevent this from happening in the future.
Bug: T167798
Change-Id: Ibdc796bb2881a2ed8194099d8c9f491980010f0f
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
I think the bug was introduced during a cleanup in Iaabc10c.
I don't think that " should be part of the legalSearchChars at query
time, it seems to break the regex.
The strategy here is to distinguish legalSearchChars used query time vs
the ones used at index time by introducing:
SearchEngine::legalSearchCharsForUpdate()
Bug: T167798
Change-Id: I61dc53665e26d3c6c48caed78dd3bbde9a33def7
Allows search engine clients that implement custom definitions
to pass engine hints used at index time.
Hints are a way to fine tune the behavior of the search engine
when handling a particular field.
As of now this is introduced for CirrusSearch to let SearchIndexField
implementations to control how the noop script is configured.
The noop hint with CirrusSearch allows to (for example):
- ignore an update if a numeric value does not change for more than X%
- control the merge strategy of complex fields
Bug: T166589
Change-Id: Ia560e41d33013c30ac47e5a60543f8cb133e61fb
In the non-default configuration where $wgAdvancedSearchHighlighting
is set to true, there is an XSS vulnerability as HTML tags are
not properly escaped if the tag spans multiple search results
Issue introduced in abf726ea0 (MediaWiki 1.13 and above).
Bug: T144845
Change-Id: I2db7888d591b97f1a01bfd3b7567ce6f169874d3
Allows search engine to suggest deleted titles for undelete search.
Note that the titles are still verified against the archive table,
to ensure search engine is not out-of-date.
Bug: T109561
Change-Id: Id6099fe9fbf18481068a6f0a329bbde0d218135f
I was bored. What? Don't look at me that way.
I mostly targetted mixed tabs and spaces, but others were not spared.
Note that some of the whitespace changes are inside HTML output,
extended regexps or SQL snippets.
Change-Id: Ie206cc946459f6befcfc2d520e35ad3ea3c0f1e0
Useful in case the client wants to re-evaluate what was set
here, or if the SearchEngine implementation wants to expose
some of its states.
In our case it allows CirrusSearch to inform SpecialSearch
that we prefer to display search results with a new experimental
layout.
Bug: T156299
Change-Id: I7f661c852ef70ea7bc9ae2959f7d6e48776a9877
Searched for /([^\d\w\s\)\]]\s*)- \d/ to find potential issues.
It seems there's no PHPCS check for this, huh.
Also fixed typo in a comment in LoginSignupSpecialPage.
Change-Id: Iaab1a1f5a9f234971e550e7909aa5c3e0c02a983
At one point SearchIndexFieldDefinition was updated to require the
engine to be passed in, but it seems that update was missed here.
BackupDumper::loadPlugin() requires the second argument, set it to
the empty string to keep current behaviour.
Change-Id: Ifbd8fc4870ff63b2d338f8bb4d251d7a3477b989
This is a pure documentation change. It mostly removes empty lines from
comments (and entirely empty comments), as well as adds a few missing
documentation blocks and fixes a minor mistake. I hope it's ok to have
this in one patch. I can split it, please tell me.
Change-Id: I9668338602ac77b903ab6b02ff56bd52743c37c4
It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files
Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
When scrolling results on prefix search api the exact Title
match is always at pos 0 even if we want to scroll the results
by setting offset to > 0.
Change-Id: Ib02c9d3e479d739e6fe79014d962db50b6fd9de8
Useful for search engines that allow users to customize search profiles.
Depends-On: Icd577c8ebc6e162befe30bde4fe276e633d2e434
Change-Id: I471cd090730d2a25cb70d622ec3bebbe9583118c
Useful for some search engines that have a keyword that wants
to reuse this logic without building a new SearchEngine object.
Change-Id: Iee5bfd1da70b8339a98555ba062bd33b21f0b761
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
Added FLAG_SOURCE_DATA to support additional data that is not supposed to be
part of the default mapping.
Should merged with I1484c2e62788bedb57a42869a5fb25cd8f64482f, otherwize rebuilding
an index may add an extra field to CirrusSearch mapping.
Bug: T134978
Change-Id: Ia41f8eeb9dd4f764543bdd4d71b7a50de8101101
This patch introduces a way for SearchEngine implementations to expose
specific search profiles useful to fine-tune the various behaviors related to
search.
A SearchEngine can expose a list of profiles by overriding
SearchEngine::getProfiles( $profileType ), profileType stands for the type of
profile being customized. Two types are added in this patch:
- completion: exposed by ApiQueryPrefixSearch and ApiOpenSearch to control
the behavior of the algorithm behind "search as you type" suggestions.
- fulltext query independent profiles: exposed by ApiQuerySearch to customize
query indpendent ranking profiles (e.g. boost by templates/incoming
links/popularity/...)
This patch allows api consumers that might have been confused by fuzzy
suggestions to switch to stricter profiles and to officialize the behavior
behind the hidden param cirrusUseCompletionSuggester. Or to control the
fulltext ranking behaviors like cirrusBoostLinks=(yes|no).
The list of profiles can be discovered by using ApiSandbox/ApiHelp and is totally
controlled by search engine implementations.
Bug: T132477
Change-Id: I66be724d8975976c98c91badbf421f237e014f89
This function was incorrectly annotated. We can clearly see from the
code that uses it, such as in SpecialSearch, that this is an array of
SearchResultSet objects.
Bug: T132625
Change-Id: I4af07d3c9a9b08fd1fa438ddb6b781f78472b26c
This is implemented in CirrusSearch so the result set can be looped
through multiple times. In general having a rewind function on any
iterator is probably a good idea, so pushing it into the upstream
interface.
Change-Id: Iaac9c11d8742288610011a2a0f6282944d35d5f3
It seems to happen when opensearch or prefixsearch api is called with an
invalid namespace parameter.
Change-Id: I1dda12c93db03c520080e8ee57bd750396905a58
A valid title, such as 0, would end up being ignored in this clause and
not providing a title. Make the empty string check stricter to allow
these titles through.
Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588
Unfortunately some backends (like Cirrus) are not able to do proper crossnamespace
lookup. If the backend returns no result we should still try an exact title match.
Bug:T129575
Change-Id: Ic08ec0aac0fd8a289f21753d74ae62ba509de841
I searched for /\$(\S+) = (.+?\(.*?\);)\n.*?\$\1\[/, ignored
everything involving isset(), unset() or array assigments, then
skimmed through the remaining results and changed things where they
made sense. These changes were not automated, so please review them.
Change-Id: Ib37b4c66fc57648470f151ad412210b3629c2538
* Fix errors spotted by new release
* Introduce "composer fix", which uses phpcbf to automatically fix some
errors spotted by phpcs.
* Drop $PHPCS_ARGS variable that didn't work on Windows, and add -s flag
* Remove rules from phpcs.xml that are now in MW-CS ruleset.
Change-Id: I13e2155695918c918b67497ac65b85a03897095e
By default it still uses PrefixSearch and supports PrefixSearchBackend
but it can be deprecated and phased out and SearchEngine extensions used
instead.
New APIs:
- SearchEngine
public function defaultPrefixSearch( $search );
public function completionSearch( $search );
public function completionSearchWithVariants( $search );
Search engines should override:
protected function completionSearchBackend( $search );
Bug: T121430
Change-Id: Ie78649591dff94d21b72fad8e4e5eab010a461df
Uses fully translated string like search-interwiki-results-abwiki
which should be present in WikimediaMessages.
Requires Ic4bdd9462f844febea2e402e4b89d9dcc4c836b6
Supports I0d0efacf3066b3b5fe0bfcb058dd0b0f9988ccae
Bug: T112349
Change-Id: Ib6524bc79e1648ccf6adc5745f0dbc4c26dcb0d2
Special:Search recently gained query rewriting behavior when the
original query returned no results. We want to expose this query
rewriting behavior to both api and web requests. Additionally we
want to be able to test different configurations of the query
suggestions. This patch allows for both by moving the rewriting
from core into the search backend.
This defaults to enabled for Special:Search, and disabled for
ApiQuerySearch. Internal code that talks to the search backend
needs to specifically enable this feature.
Bug: T106888
Change-Id: I0a8f75759f9148f53358707369b8a7128215de86
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.
Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.
Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.
Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
The SearchResultSet is returned where no query is performed because it
is known ahead of time that no result exists. In cases where that is
known due to the syntax of the query (e.g. the syntax requires
searching a category that does not exist) this searchContainedSyntax
method returns the wrong value. This patch makes it possible for the
instantiating code to properly set the return value of this method.
Change-Id: I7b7be24f5630a48d2a561e4fda9cec696a8cacf9
This variable is set to null in the replacePrefixes method, document
it as such to prevent errors in consuming code.
Bug: T98082
Change-Id: I78880ffe590ed7193b8482c0ae41c8c69e495878
…and instead look for the Cite class. Not really any better, but
it will let us eliminate the "wfCite" global function.
Change-Id: Icdf82cb9771e6ae9bcaa6a02629b1b11f840a5c6
When a page is updated under PostgreSQL, there is code to
de-index all but the most recent version of the page. But
when a page is moved, it was accidentally de-indexing the
most recent version as well, because rev_text_id is not
incremented in that case. A simple tweak to the SQL
fixes that.
I added code to the update script to find pages
previously corrupted by this problem and reindex them.
Bug: 66650
Change-Id: I52e1bbbd8592be5e7c7383c225e6b4c19bbe5b9e
SearchEngine grows a method to list valid sort orders one to set the
sort for the next search, and one to read it. The default implemenation
only supports 'relevance' and the documenation strongly urges that all
other implemenations leave that as the default. Other implementations
can support other orders. Cirrus already supports title_asc and title_desc.
Change-Id: Ie946150c6796139201221dfa6f7750c210e97166
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
There's really no reason for the extension to exist separately from
core, and merging it reduces the risks of bitrot in both the extension
(lots of deprecated functions there) and core (missing integration with
PageImages and TextExtracts, for example).
Change-Id: Ie0ab90902ede9499879402290006466efba479e9
DatabaseBase::query() already passes the value returned by the
database driver (usually an object or resource for SELECT queries)
through $db->resultObject(). There is no need to pass it through
the method a second time to get a ResultWrapper.
Change-Id: I5d34ab2bffb7f236d2f824b4ef0e8670f89d4599
- Remove old pre-1.17 constructor format. No core or extension callers
- Remove only usage of newFromRow(), needless abstraction
Change-Id: Ifad161aa36837bb4c8b5c9aecac1c46e2e6cc84c
Poorly documented and never used anywhere properly.
- No core search backend supports it.
- MWSearch implements it but we've never turned it on.
- SolrStore copies MWSearch but it doesn't even work.
- CirrusSearch doesn't bother because it's silly.
Change-Id: I8b052e8e772030fba6c361fdb2775b10a7f7a15a
Otherwise, multiple calls to searchQuery() would accumulate search
terms. searchTerms[] is defined in SearchEngine so we can't just get
rid of it altogether.
Change-Id: Iddbb3920e3a9d5849c99fe90d2d725d16019b51d
- Added space after reserved words: function, foreach, if
- Combined 'else if' into elseif
- Added braces to one-line statements
- Added spaces after comma, before parentheses
Change-Id: Ie5bbf680d6fbe0f0872dab2700c16b1394906a72
If the search engine does not know the concept of serch terms the search
result object will just return an empty array as defined in class
SearchResultSet.
In this case SearchHighlighter::highlightSimple will place a span between
each and every byte (yes, byte, not character, it will break multibyte
chars).
This patch will just output the first few lines of a page if no search
terms are available for highlighting.
Note: Highlighting the page name in the case of title matches is
questionable, IMHO. It might make more sense for this case as well to
just return the first few lines of the page.
Change-Id: I276418f271855fb99443188f51cc076289c6ba0d
Scores are an internal metric that should not be exposed to
users, plus most backends fail to even support it.
Removes PostgresSearch*-specific result classes as they're not
needed anymore.
Change-Id: I00acaabad0565b9a5b3524c992feea366eb74bcc
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: Ie419638e909a47aa72a274043604247830ee1a81
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts
Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
If $wgCountTotalSearchHits was set to true, then the total
number of hits returned was zero, which caused Special:Search
to display no results.
I'm opting to remove the feature (although I don't have any
strong opinions about removal vs changing Special:Search), since
if someone both cares about performance and has a wiki where its
big enough to matter, they are going to need to use Cirrus anyways.
Change-Id: I1c3b908ae5423ce3dfbdc22b1a68dd81a85698aa
This hook is poorly thought out. The only extension that uses it
can't possibly think it works how they're expecting.
Change-Id: I853a01afc8e922f22e949321a2f2343d264632a6
- Move filter() function and make it protected, nothing uses it
outside database-backed searching
- Use per-backend legal search characters rather than assuming the
static implementation is right
Change-Id: Ic2b830b56137b2dfe68b9b9c3de012151e716952
Only worked for Postgres, and only worked halfway at that. Result
sets could be false for many reasons. No results, bad query, database
went to Mars. We shouldn't assume they're always "too many results."
Leave it up to the normal query error logging and move on.
Change-Id: Ieddd163e440ae54b152541d727c1afdbc4ab4fbd
SolrStore, MWSearch and CirrusSearch all implement this and are
now free to drop their implementations.
Change-Id: Ia04bd3fc8526c35c3c9590c7fe4e2db2bc120283
* Checkbox on own row below power search checkboxes per MatmaRex;
avoiding a mw-search-ns* id leaves it untouched by All/None JS.
* The option searcheverything is removed: a "shortcut" which is no
longer necessary now that options can be (un)selected at once
with All/None buttons on search page itself.
* Require a token for saving: no accidental preferences changes.
* Keep the searchoptions/advancedsearchoptions prefs section in case
something is using it (no known extension does though); options
are converted to "api" type so it's empty and hidden by default.
* Add minimal documentation for saveSettings() and friends
(@todo since 155ddf6de, 2009!).
Bug: 52817
Change-Id: I514cee835988600cc013658049e88a10b670e64a
The vast majority of wikis have an empty help namespace and
searching project pages is mostly an advanced search feature.
Cluttering the UI with an extra tab that's (most likely) rarely
clicked isn't helping anyone.
Change-Id: I0c448bcee877e027ff95c96812aac86d89d4eb32
SqlSearchResultSet basically handles all of the work in a DB-agnostic
manner. Remove specific implementations for MySQL, Mssql and Sqlite
Change-Id: Iae3fd5cc40dfbc50917be73d7ace668681e4148a
Whenever a new revision is added, a deferred update gets enqueued.
When it is fired, it clears the searchable text from all earlier
revisions for the article. This becomes very slow for articles
with long revision histories, as it re-clears the textvector even
when it has already been cleared by earlier actions. This leads to
very high load in the database for runs of importDump.php
This patch improves this situation by adding a condition to the WHERE
clause such that it does not update rows in which the textvector
is already NULL.
PostgreSQL cannot automatically remove such degenerate updates
in general because the updated rows must be locked and have their
transaction markers increased. However, in this particular case
those things are unimportant.
This change improves the performance of importDump.php on a
wiki with long revision histories by 7 fold, and moves the
major bottleneck from the database to PHP. It might also
improve the performance of ordinary page edits, but that
was not tested.
There are more improvements that could be made here. For example,
a partial index or expression index could make it so that already
cleared rows do not have to be visited at all. Or the deferred
update mechanism could have a notion of "idempotency" so that many
indentical updates enqueued during bulk loading would be condensed
to only a single execution. However, this change is very much
simpler and is sufficient to shift the bottleneck elsewhere.
Change-Id: I458603767c6a86425010d02ffc1f8079c4b3c9a0
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a
Always include redirects. Search results are worse without them
and MWSearch has never respected this option anyway.
Change-Id: I0ebe321a3b14e7960aa98e3225dc5a19ba916e7d
Embedding random strings in Special:Search's comments doesn't
help debugging and just increases page size.
Bug: 62768
Change-Id: I51270aa3f2cba921841e2d8ebbd4fa665542f8a9