Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fulltext to add support for TYPE_WIKIPAGE, refs 1481, 1801, 1912 #2122

Merged
merged 1 commit into from Dec 18, 2016

Conversation

Projects
None yet
2 participants
@mwjames
Copy link
Contributor

mwjames commented Dec 18, 2016

This PR is made in reference to: #1481, #1801, #1912

This PR addresses or contains:

  • Adds smwgFulltextSearchIndexableDataTypes to describe what datatypes are allowed to be indexed using the full-text search (by default this being BLOB and URI)
  • Adds support for page type properties to use the same ~ matching operation (incl. case insensitivity) as for BLOB and URI types

This PR includes:

  • Tests (unit/integration)
  • CI build passed

@mwjames mwjames added the enhancement label Dec 18, 2016

@mwjames mwjames added this to the SMW 2.5 milestone Dec 18, 2016

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Dec 18, 2016

@kghbln as Christmas present! SMW_FT_WIKIPAGE as indexable dataType is NOT enabled by default because:

##
# List of indexable DataTypes
#
# - SMW_FT_BLOB property values of type Blob (Text)
# - SMW_FT_URI property values of type URI
# - SMW_FT_WIKIPAGE property values of type Page
#
# SMW_FT_WIKIPAGE has not been added as default value as no performance
# impact analysis is available as to how indexing and search performance would
# be affected by a wiki with a large pool of pages (10K+) or extended page
# type value assignments on a full-text index.
#
# Enabling SMW_FT_WIKIPAGE will support the same search features (case
# insensitivity, phrase matching etc.) as available for Text or URI values
# when searches are executed using the ~/!~.
#
# @since 2.5
# @default: SMW_FT_BLOB | SMW_FT_URI
##
'smwgFulltextSearchIndexableDataTypes' => SMW_FT_BLOB | SMW_FT_URI,
##
@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Dec 18, 2016

$ php maintenance/rebuildFulltextSearchTable.php

Will indicated which types are enabled:

- DataTypes (Indexable)            BLOB, URI, WIKIPAGE
...
- smw_di_wikipage                   100% (13076/13076)

Some external properties with a WIKIPAGE type has been preemptively exempted from the index.

- _ASKFO, _ASKST, _IMPO, _LCODE, _UNIT, _CONV, _TYPE, _ERRT, _INST
- _ASK, _SOBJ, ___EUSER, ___CUSER, ___SUBP, ___EXIFDATA, __sci_cite
- __sil_iwl_lang, __sil_ill_lang

@mwjames mwjames merged commit abc1128 into master Dec 18, 2016

3 checks passed

Scrutinizer 9 new issues, 19 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mwjames mwjames deleted the fulltext branch Dec 18, 2016

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Mar 11, 2017

@mwjames Setting $smwgFulltextSearchIndexableDataTypes = $smwgFulltextSearchIndexableDataTypes | SMW_FT_WIKIPAGE; to add datatype page should work, too?

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Mar 11, 2017

Setting $smwgFulltextSearchIndexableDataTypes = $smwgFulltextSearchIndexableDataTypes | SMW_FT_WIKIPAGE; to add datatype page should work, too?

Yes (for | see http://php.net/manual/en/language.operators.bitwise.php)

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Mar 11, 2017

Yes

Thanks a lot for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.