operator

Logical operator definition

Attributes

Children

Examples

Input Example:

  <field name="query" record="record"/>
  <param name="q" value="test"/>
  <form name="vivisimo">
  <input name="q" field="query"/>
  </form>
  <query form="vivisimo"/>

Output Example:

  <param name="q" value="test"/>
  <meta query=" test "/>
  <field name="query" record="record"/>
  <form name="vivisimo">
  <input name="q" field="query"/>
  </form>
  <query>
  <operator logic="and">
  <term field="query" str="test" position="0"/>
  </operator>
  </query>

Input Example:

  <operator name="any" logic="or"/>
  <field name="query" record="record"/>
  <query>
  <operator logic="and">
  <term str="a" field="query"/>
  <term str="b" field="query"/>
  </operator>
  </query>
  <submit num="50">
  <form action="http://test">
  <input name="i" field="query">
  <operator middle-string="AND" logic="and"/>
  <operator logic="or"/>
  </input>
  </form>
  </submit>
  <submit num="50">
  <form action="http://test">
  <input name="i" field="query" syntax=""/>
  </form>
  </submit>
  <submit num="30">
  <form action="http://test">
  <input name="i" field="query">
  <operator middle-string="AND" logic="and"/>
  </input>
  </form>
  </submit>
  <submit num="20">
  <form action="http://test">
  <input name="i" field="query">
  <operator logic="or"/>
  </input>
  </form>
  </submit>
  <submit num="10">
  <form action="http://test">
  <input name="i" field="query">
  <operator logic="phrase"/>
  </input>
  <input name="j" field="query">
  <operator logic="phrase"/>
  </input>
  </form>
  </submit>

Output Example:

  <meta query=" a b "/>
  <operator name="any" logic="or"/>
  <field name="query" record="record"/>
  <query>
  <operator logic="and">
  <term str="a" field="query"/>
  <term str="b" field="query"/>
  </operator>
  </query>
  <submit num="50" status="translated" last-rank="50" last-page="1">
  <form action="http://test" normalized="normalized" status="trans-succeeded">
  <input name="i" field="query" logic="or" delimiters=" &#13;&#10;&#9;&#x3000;" position="0" value="a AND b">
  <operator middle-string="AND" logic="and"/>
  </input>
  <input field="per"/>
  </form>
  </submit>
  <scope max="50" orig-tag="submit">
  <parse url="http://test/?i=a_AND_b" per="50" page="0" start="0" parser="#vxml#" ref="0"/>
  </scope>
  <submit num="50" status="translated" last-rank="50" last-page="1">
  <form action="http://test" normalized="normalized" status="trans-succeeded">
  <input name="i" field="query" syntax="" logic="and" delimiters=" &#13;&#10;&#9;&#x3000;" position="0" value="a b"/>
  <input field="per"/>
  </form>
  </submit>
  <scope max="50" orig-tag="submit">
  <parse url="http://test/?i=a_b" per="50" page="0" start="0" parser="#vxml#" ref="1"/>
  </scope>
  <submit num="30" status="translated" last-rank="30" last-page="1">
  <form action="http://test" normalized="normalized" status="trans-succeeded">
  <input name="i" field="query" logic="and" delimiters=" &#13;&#10;&#9;&#x3000;" position="0" value="a b">
  <operator middle-string="AND" logic="and"/>
  </input>
  <input field="per"/>
  </form>
  </submit>
  <scope max="30" orig-tag="submit">
  <parse url="http://test/?i=a_b" per="30" page="0" start="0" parser="#vxml#" ref="2"/>
  </scope>
  <submit num="20" status="translation-failed">
  <form action="http://test" normalized="normalized" status="trans-failed">
  <input name="i" field="query" logic="or" delimiters=" &#13;&#10;&#9;&#x3000;" position="0"/>
  </form>
  <contextual-msg name="bad-sub-query">
  <msg time="5" date="1170291631" cputime="0" id="QUERY_NO_CONVERT" function="vivisimo_input_xml" fid="0">The query has not been converted because of sub-query
  <xmlnode>
  <term str="b" field="query"/>
  </xmlnode>
  </msg>
  <term str="b" field="query"/>
  </contextual-msg>
  </submit>
  <submit num="10" status="translated" last-rank="10" last-page="1">
  <form action="http://test" normalized="normalized" status="trans-succeeded">
  <input name="i" field="query" delimiters="" logic="and" position="0" value="a"/>
  <input name="j" field="query" delimiters="" logic="and" position="1" value="b"/>
  <input field="per"/>
  </form>
  </submit>
  <scope max="10" orig-tag="submit">
  <parse url="http://test/?i=a&amp;j=b" per="10" page="0" start="0" parser="#vxml#" ref="3"/>
  </scope>

Input Example:

  <field name="query" record="record"/>
  <field name="title" record="record"/>
  <field name="date"/>
  <operator name="OR" middle-string="OR" logic="or"/>
  <operator name="parenthesis" start-string="(" end-string=")" logic="bracket"/>
  <operator name="AND" middle-string="AND" logic="and" precedence="1"/>
  <operator name="squot" start-string="'" end-string="'" logic="phrase"/>
  <operator name="not" start-string="-" logic="not"/>
  <operator name="title" start-string="title:" field="title"/>
  <operator name="author" end-string="[au]" field="author"/>
  <operator name="date" start-string="[date[" end-string="]]" field="date"/>
  <operator name="near" start-string="{" middle-string="," end-string="}" logic="near"/>
  <param name="query" value="'r s' 't u OR v"/>
  <param name="query" value="-w"/>
  <param name="query" value="x-y"/>
  <param name="query" value="-title:'z a'"/>
  <param name="query" value="b[au] c [au]"/>
  <param name="query" value="[date[d]]"/>
  <param name="query" value="{e,f} {g , h}"/>
  <param name="query" value="-[au] -AND -OR -- "/>
  <param name="query" value="-- "/>
  <form name="f">
  <input name="query" field="query" syntax="OR AND parenthesis wildcard squot not title author date near"/>
  </form>
  <query form="f"/>

Output Example:

  <param name="query" value="'r s' 't u OR v"/>
  <param name="query" value="-w"/>
  <param name="query" value="x-y"/>
  <param name="query" value="-title:'z a'"/>
  <param name="query" value="b[au] c [au]"/>
  <param name="query" value="[date[d]]"/>
  <param name="query" value="{e,f} {g , h}"/>
  <param name="query" value="-[au] -AND -OR -- "/>
  <param name="query" value="-- "/>
  <meta query=" r s 't u  | v w x-y z a b c e f g h [au] AND OR - - "/>
  <field name="query" record="record"/>
  <field name="title" record="record"/>
  <field name="date"/>
  <operator name="OR" middle-string="OR" logic="or"/>
  <operator name="parenthesis" start-string="(" end-string=")" logic="bracket"/>
  <operator name="AND" middle-string="AND" logic="and" precedence="1"/>
  <operator name="squot" start-string="'" end-string="'" logic="phrase"/>
  <operator name="not" start-string="-" logic="not"/>
  <operator name="title" start-string="title:" field="title"/>
  <operator name="author" end-string="[au]" field="author"/>
  <operator name="date" start-string="[date[" end-string="]]" field="date"/>
  <operator name="near" start-string="{" middle-string="," end-string="}" logic="near"/>
  <form name="f">
  <input name="query" field="query" syntax="OR AND parenthesis wildcard squot not title author date near"/>
  </form>
  <query>
  <operator logic="and">
  <term field="query" str="r s" phrase="phrase" position="0"/>
  <term field="query" str="'t" position="1"/>
  <operator name="OR" middle-string="OR" logic="or">
  <term field="query" str="u" position="2"/>
  <term field="query" str="v" position="3"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="w" position="4"/>
  </operator>
  <term field="query" str="x-y" position="5"/>
  <operator name="not" start-string="-" logic="not">
  <term field="title" str="z a" phrase="phrase" position="6"/>
  </operator>
  <term field="author" str="b" position="7" processing="strict"/>
  <term field="author" str="c" position="8" processing="strict"/>
  <term field="date" str="d" position="9"/>
  <operator name="near" start-string="{" middle-string="," end-string="}" logic="near">
  <term field="query" str="e" position="10"/>
  <term field="query" str="f" position="11"/>
  </operator>
  <operator name="near" start-string="{" middle-string="," end-string="}" logic="near">
  <term field="query" str="g" position="12"/>
  <term field="query" str="h" position="13"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="[au]" position="14"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="AND" position="15"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="OR" position="16"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="-" position="17"/>
  </operator>
  <operator name="not" start-string="-" logic="not">
  <term field="query" str="-" position="18"/>
  </operator>
  </operator>
  </query>