« Issue/1481 (Fulltext)/Text examples » : différence entre les versions
De Semantic MediaWiki - Sandbox
m (Mwjames a déplacé la page Issue/1481 (Fulltext)/Text examples vers Issue/1481 (Fulltext)/Text examples) |
(https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1762) |
||
Ligne 9 : | Ligne 9 : | ||
</pre> | </pre> | ||
{{#ask: [[Category:Fulltext example]] [[Has text::~+MariaDB -database]] | {{#ask: [[Category:Fulltext example]] [[Has text::~+MariaDB -database]] | ||
|?Has text | |||
}} | |||
<pre> | |||
{{#ask: [[Category:Fulltext example]] [[Has text::~+*maria* -postgres*]] | |||
|?Has text | |||
}} | |||
</pre> | |||
{{#ask: [[Category:Fulltext example]] [[Has text::~+*maria* -postgres*]] | |||
|?Has text | |?Has text | ||
}} | }} |
Dernière version du 7 août 2016 à 22:22
Term include and exclude
Using -
or !~
requires at least two terms in order for the fulltext to match a result. (see also Boolean Full-Text Searches)
{{#ask: [[Category:Fulltext example]] [[Has text::~+MariaDB -database]] |?Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | MariaDB overview |
{{#ask: [[Category:Fulltext example]] [[Has text::~+*maria* -postgres*]] |?Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MariaDB overview |
{{#ask: [[Category:Fulltext example]] [[Has text::~+database]] |?Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | PostgreSQL vs MariaDB database and more of |
With/without query expansion
Describes as "...'MariaDB' is always associated with the word 'database', so it is returned when query expansion is used, even though not explicitly requested...." https://mariadb.com/kb/en/mariadb/fulltext-index-overview/
{{#ask: [[Category:Fulltext example]] [[Has text::~database]] |?Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | PostgreSQL vs MariaDB database and more of |
&QEX
indicates to switch to the WITH QUERY EXPANSION
mode.
{{#ask: [[Category:Fulltext example]] [[Has text::~database&QEX]] |?Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | PostgreSQL vs MariaDB database and more of |
Partial term matching
Case insensitive
{{#ask: [[Category:Fulltext example]] [[Has text::~mariadb]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | PostgreSQL vs MariaDB database and more of |
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MariaDB overview |
Case insensitive with wildcard
{{#ask: [[Category:Fulltext example]] [[Has text::~DATA*]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | PostgreSQL vs MariaDB database and more of |
Issue/1481 (Fulltext)/Text examples | Oracle vs MariaDB database |
Issue/1481 (Fulltext)/Text examples | MySQL vs MariaDB database |
{{#ask: [[Category:Fulltext example]] [[Has text::~sEAr*]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Elastic search |
Issue/1481 (Fulltext)/Text examples | Sphinx search |
Wildcard include, exclude term match
{{#ask: [[Category:Fulltext example]] [[Has text::~sear*, -elas*]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Sphinx search |
{{#ask:[[Category:Fulltext example]] [[Has text::!~elastic*, +sear*]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Sphinx search |
Phrase matching
{{#ask: [[Category:Fulltext example]] [[Has text::~"life is no longer life"]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | I will tell you, Socrates, he said, what my own feeling is. Men of my age flock together; we are birds of a feather, as the old proverb says; and at our meetings the tale of my acquaintance commonly is --I cannot eat, I cannot drink; the pleasures of youth and love are fled away: there was a good time once, but now that is gone, and life is no longer life. Some complain ... |
Minimum token size
The search term does not fullfill the $smwgFulltextSearchMinTokenSize
hence the query switches to the LIKE
expression instead of using the fulltext index.
{{#ask: [[Category:Fulltext example]] [[Has text::~Tr*]] |?Has text |sort=Has text }}
Has text | |
---|---|
Issue/1481 (Fulltext)/Text examples | Transactions |
Issue/1481 (Fulltext)/Text examples | Triggers |
Example data
{{#subobject: |@category=Fulltext example |Has text=MySQL vs MariaDB database }}{{#subobject: |@category=Fulltext example |Has text=Oracle vs MariaDB database }}{{#subobject: |@category=Fulltext example |Has text=PostgreSQL vs MariaDB database and more of }}{{#subobject: |@category=Fulltext example |Has text=MariaDB overview }}{{#subobject: |@category=Fulltext example |Has text=Elastic search }}{{#subobject: |@category=Fulltext example |Has text=Sphinx search }}{{#subobject: |@category=Fulltext example |Has text=Transactions }}{{#subobject: |@category=Fulltext example |Has text=Triggers }}{{#subobject: |@category=Fulltext example |Has text=I will tell you, Socrates, he said, what my own feeling is. Men of my age flock together; we are birds of a feather, as the old proverb says; and at our meetings the tale of my acquaintance commonly is --I cannot eat, I cannot drink; the pleasures of youth and love are fled away: there was a good time once, but now that is gone, and life is no longer life. Some complain ... }}