Différences entre les versions de « LongText/Query »

De Semantic MediaWiki - Sandbox
 
(Une version intermédiaire par le même utilisateur non affichée)
Ligne 1 : Ligne 1 :
Support phrase matching within a long texts using the <code>~~</code> as expression to indicate an approximate search [[CiteRef::gh:smw:1481]] when the property is unknown.
+
Support phrase matching within long texts using the <code>~~</code> as expression to indicate an approximate search [[CiteRef::gh:smw:1481]] when the property is unknown (not printing the text on purpose here).
  
 
<pre>
 
<pre>
{{#ask:[[~~parable, which embodies in the]]
+
{{#ask: [[~~"Plato among the Greeks, like Bacon"]]
 +
|format=broadtable
 +
|link=all
 +
|headers=show
 +
}}
 +
</pre>
 +
 
 +
{{#ask: [[~~"Plato among the Greeks, like Bacon"]]
 +
|format=broadtable
 +
|link=all
 +
|headers=show
 +
}}
 +
 
 +
<pre>
 +
{{#ask: [[~~parable, which embodies in the]]
 
  |format=broadtable
 
  |format=broadtable
 
  |link=all
 
  |link=all
Ligne 9 : Ligne 23 :
 
</pre>
 
</pre>
  
{{#ask:[[~~parable, which embodies in the]]
+
{{#ask: [[~~parable, which embodies in the]]
 
  |format=broadtable
 
  |format=broadtable
 
  |link=all
 
  |link=all
Ligne 21 : Ligne 35 :
 
  |headers=show
 
  |headers=show
 
}}
 
}}
 +
 +
__NOTOC__

Dernière version du 14 septembre 2016 à 22:11

Support phrase matching within long texts using the ~~ as expression to indicate an approximate search 1 when the property is unknown (not printing the text on purpose here).

{{#ask: [[~~"Plato among the Greeks, like Bacon"]]
 |format=broadtable
 |link=all
 |headers=show
}}
 
Issue/1481 (Fulltext)/Long text example (The Republic)
LongText
LongText/Query
LongText/Query
{{#ask: [[~~parable, which embodies in the]]
 |format=broadtable
 |link=all
 |headers=show
}}
 
LongText
LongText/Query
LongText/Query
LongText/Query

Debug

Debug outputElasticStore
{ "smw": { "query": "[[~~parable, which embodies in the]]", "sort": { "": "ASC" }, "metrics": { "query size": 1, "query depth": 0 }, "description_log": [ { "ValueDescription": "[[~~parable, which embodies in the]]" } ] }, "elastic": [ { "index": "smw-data-db9910120150926-02100_", "type": "data", "body": { "_source": false, "from": 0, "size": 251, "query": { "constant_score": { "filter": { "bool": { "must": [ { "multi_match": { "fields": [ "subject.title^8", "text_copy^5", "text_raw", "attachment.title^3", "attachment.content" ], "query": "parable, which embodies in the", "type": "phrase" } } ] } } } }, "sort": [ { "subject.sortkey.sort": { "order": "asc" }, "subject.title.sort": { "order": "asc" } } ] } }, { "_shards": { "total": 1, "successful": 1, "failed": 0 }, "valid": true, "explanations": [ { "index": "smw-data-db9910120150926-02100_-v2", "valid": true, "explanation": "+ConstantScore(+(text_raw:"parable which embodies in the" | (subject.title:"parable which embodies in the")^8.0 | (text_copy:"parable which embodies in the")^5.0)) #*:*" } ] } ] }


Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.