<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://g2.doxu.org/index.php?action=history&amp;feed=atom&amp;title=Simple_Query_Language_and_Metadata</id>
	<title>Simple Query Language and Metadata - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://g2.doxu.org/index.php?action=history&amp;feed=atom&amp;title=Simple_Query_Language_and_Metadata"/>
	<link rel="alternate" type="text/html" href="https://g2.doxu.org/index.php?title=Simple_Query_Language_and_Metadata&amp;action=history"/>
	<updated>2026-04-28T04:46:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://g2.doxu.org/index.php?title=Simple_Query_Language_and_Metadata&amp;diff=1660&amp;oldid=prev</id>
		<title>Kath: /* Generic Matching on Metadata */</title>
		<link rel="alternate" type="text/html" href="https://g2.doxu.org/index.php?title=Simple_Query_Language_and_Metadata&amp;diff=1660&amp;oldid=prev"/>
		<updated>2005-03-27T13:44:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Generic Matching on Metadata&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:44, 27 March 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l71&quot;&gt;Line 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 71:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Generic Matching on Metadata ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Generic Matching on Metadata ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Generic search criteria (/Q2/DN) can be matched against metadata fields, however&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Generic search criteria (/Q2/DN) can be matched against metadata fields, however&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;,&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;care must be taken not to match against data members which are not directly&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;care must be taken not to match against data members which are not directly&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;descriptive to the object. Client-side schema descriptors are a good solution, listing&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;descriptive to the object. Client-side schema descriptors are a good solution, listing&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;the scope of a general search on each recognised schema.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;the scope of a general search on each recognised schema.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kath</name></author>
	</entry>
	<entry>
		<id>https://g2.doxu.org/index.php?title=Simple_Query_Language_and_Metadata&amp;diff=19&amp;oldid=prev</id>
		<title>Dcat at 20:59, 20 March 2005</title>
		<link rel="alternate" type="text/html" href="https://g2.doxu.org/index.php?title=Simple_Query_Language_and_Metadata&amp;diff=19&amp;oldid=prev"/>
		<updated>2005-03-20T20:59:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
An effective search system must provide a query language which is:&lt;br /&gt;
&lt;br /&gt;
* Powerful&lt;br /&gt;
* Intuitive&lt;br /&gt;
* Natural&lt;br /&gt;
&lt;br /&gt;
At the same time, it is desirable for the language to be reasonably easy to parse in&lt;br /&gt;
software.&lt;br /&gt;
&lt;br /&gt;
Gnutella2 employs a simple query language that is familiar to users of web search&lt;br /&gt;
engines and allows most common criteria to be entered intuitively.&lt;br /&gt;
&lt;br /&gt;
Query Language Definition&lt;br /&gt;
&lt;br /&gt;
* Every search string is considered a list of words.&lt;br /&gt;
* Words are identified as sequences of alphanumeric characters. Other symbols and white space are ignored.&lt;br /&gt;
* In the basic case, every word in the list must appear one or more times in a matching string.&lt;br /&gt;
* Words may be marked as negative words or excluded words by prefixing them with a dash (-).&lt;br /&gt;
* In this case, every positive word in the list must appear and every negative word must not appear in a matching string.&lt;br /&gt;
* Words can be grouped together with quotes. The negation operator (-) may not appear inside a quoted string, but it may prefix a quoted string in which case the negation is applied to the quoted string as a whole.&lt;br /&gt;
* The words in a quoted string must appear in the same order in a matching string. Conversely, the words in a negated quoted string must not appear or must not appear in the same order in a matching string.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Cat Dog&lt;br /&gt;
(matches strings with &amp;quot;cat&amp;quot; and &amp;quot;dog&amp;quot;, in any order)&lt;br /&gt;
&lt;br /&gt;
-Cat Dog&lt;br /&gt;
(matches strings with &amp;quot;dog&amp;quot; but not &amp;quot;cat&amp;quot;, in any order)&lt;br /&gt;
&lt;br /&gt;
-Cat -Dog&lt;br /&gt;
(matches strings with neither &amp;quot;cat&amp;quot; nor &amp;quot;dog&amp;quot;, illegal in an external search as there are no positive words)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;cat dog&amp;quot;&lt;br /&gt;
(matches strings with &amp;quot;cat&amp;quot; followed by &amp;quot;dog&amp;quot;, &amp;quot;cat dog&amp;quot; matches, &amp;quot;dog cat&amp;quot; does not)&lt;br /&gt;
&lt;br /&gt;
-&amp;quot;cat dog&amp;quot;&lt;br /&gt;
(matches strings without &amp;quot;cat dog&amp;quot;, &amp;quot;cat dog&amp;quot; does not match, &amp;quot;dog cat&amp;quot; does)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;cat dog&amp;quot; -fish&lt;br /&gt;
(matches strings with &amp;quot;cat dog&amp;quot; and without &amp;quot;fish&amp;quot;)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Metadata Searching ==&lt;br /&gt;
&lt;br /&gt;
Searching metadata involves a set of specific rules:&lt;br /&gt;
&lt;br /&gt;
* If a metadata schema is specified as search criteria, matching objects that have metadata must share the same schema&lt;br /&gt;
* Metadata can only be compared if criteria and object share the same schema&lt;br /&gt;
* Each data member (attribute or element) of metadata is compared separately&lt;br /&gt;
* Where a member is specified in the criteria but not in the object, the match fails&lt;br /&gt;
* Where a member is specified in the object but not in the criteria, the member is ignored&lt;br /&gt;
* The search criteria for each text/string member is in the simple query language defined above&lt;br /&gt;
* The search criteria for numeric members is range based, defined in a subsequent section.&lt;br /&gt;
&lt;br /&gt;
== Numeric Range Matching ==&lt;br /&gt;
&lt;br /&gt;
When comparing numeric values, the match function is specified by the search&lt;br /&gt;
criteria:&lt;br /&gt;
&lt;br /&gt;
* If a value is specified, the value must match exactly&lt;br /&gt;
* If a range (X-Y) is specified, the value must lie within that inclusive range&lt;br /&gt;
* If (X-) is specified, the value must be greater than or equal to X&lt;br /&gt;
* If (-X) is specified, the value must be less than or equal to X&lt;br /&gt;
&lt;br /&gt;
== Generic Matching on Metadata ==&lt;br /&gt;
&lt;br /&gt;
Generic search criteria (/Q2/DN) can be matched against metadata fields, however&lt;br /&gt;
care must be taken not to match against data members which are not directly&lt;br /&gt;
descriptive to the object. Client-side schema descriptors are a good solution, listing&lt;br /&gt;
the scope of a general search on each recognised schema.&lt;/div&gt;</summary>
		<author><name>Dcat</name></author>
	</entry>
</feed>