<!DOCTYPE html>
<html>
<head>
</head>
<body>
<dl style="line-height: 1.5; margin-left: 2em">
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
<dd style="margin-left: 8.5em">Kouhei Sutou <kou****@clear*****></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
<dd style="margin-left: 8.5em">2012-08-06 13:04:25 +0900 (Mon, 06 Aug 2012)</dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
<dd style="margin-left: 8.5em"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf">ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf</a></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Log</dt>
<dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; padding: 0.5em">bq: throw exception for missing group start "("</pre></dd>
<dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
<dd style="margin-left: 8.5em">
<ul>
<li><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#diff-0">lib/bq-translator.js</a></li>
<li><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#diff-1">test/bq-translator.test.js</a></li>
</ul>
</dd>
</dl>
<div class="diff-section" style="clear: both">
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: lib/bq-translator.js (+7 -3)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L54">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L55">55</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L57">57</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L58">58</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L59">59</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L61">61</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L62">62</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L260">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L261">261</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L262">262</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L263">263</a></span>
<span class="diff-line-number-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L264">264</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L265">265</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L266">266</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0L267">267</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R54">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R55">55</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R56">56</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R57">57</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R58">58</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R59">59</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R60">60</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R61">61</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R259">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R260">260</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R261">261</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R262">262</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R263">263</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R264">264</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R265">265</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R266">266</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R267">267</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R268">268</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R269">269</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R270">270</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L0R271">271</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -55,8 +55,7 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">BooleanQueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> translateGroup: function() {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (this.query[this.offset] != "(") {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- // TODO: report error</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return "";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ this.throwTranslateError("not started with <(>");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-not-changed" style="display: block; white-space: pre"> this.offset++;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -261,7 +260,12 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">BooleanQueryTranslator.prototype = {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> return "";</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> translateExpressionValueStringKeyword: function(field, value) {</span>
<span class="diff-deleted" style="background-color: #ffaaaa; color: #000000; display: block; white-space: pre">- return field + " @ " + "\"" + value + "\"";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ var operator = "@";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ if (value[value.length - 1] == "*") {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ operator = "@^";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ value = value.substring(0, value.length - 1);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ return field + " " + operator + " " + "\"" + value + "\"";</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> },</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> translateExpressionValuePhrase: function(field) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> if (!(this.query[this.offset] == "'" &&</span>
</pre>
</td>
</tr>
</tbody>
</table>
<table style="border-collapse: collapse; border: 1px solid #aaa">
<thead>
<tr class="diff-header" style="border: 1px solid #aaa">
<td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre"> Modified: test/bq-translator.test.js (+26 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
</td>
</tr>
</thead>
<tbody>
<tr>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L51">51</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L52">52</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L53">53</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L54">54</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L104">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L105">105</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L106">106</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L107">107</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L108">108</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L109">109</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L110">110</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L116">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L117">117</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L118">118</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L119">119</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre"> </span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L120">120</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L121">121</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1L122">122</a></span>
</pre>
</th>
<th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R48">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R49">49</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R50">50</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R51">51</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R52">52</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R53">53</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R54">54</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R55">55</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R56">56</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R57">57</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R58">58</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R59">59</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R60">60</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R61">61</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R62">62</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R63">63</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R64">64</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R65">65</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R66">66</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R67">67</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R68">68</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R69">69</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R70">70</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R71">71</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R121">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R122">122</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R123">123</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R124">124</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R125">125</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R126">126</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R127">127</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R128">128</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R129">129</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R130">130</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R131">131</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R132">132</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R138">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R139">139</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R140">140</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R141">141</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R142">142</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R143">143</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R144">144</a></span>
<span class="diff-line-number-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R145">145</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R146">146</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R147">147</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/groonga/gcs/commit/ec2cebb0a921fb4ae793fc2ac13f4e87b209d1bf#L1R148">148</a></span>
</pre>
</th>
<td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, "Liberation Mono", Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -49,6 +49,23 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">function testGroup(label, group, expectedOffset, expectedScriptGrnExpr) {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> });</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> }</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+function testGroupError(label, group, context, detail) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ test('error: group: ' + label + ': ' + '<' + group + '>', function() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ var translator = new BooleanQueryTranslator(group);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ translator.defaultField = "field";</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ var actualError;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ assert.throw(function() {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ try {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ translator.translateGroup();</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ } catch (error) {</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ actualError = error;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ throw error;</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ }</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ });</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ assert.equal(actualError.message, "<" + context + ">" + ": " + detail);</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ });</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+}</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> function testExpression(label, expression,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> expectedOffset, expectedScriptGrnExpr) {</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> test('expression: ' + label + ': ' +</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -105,6 +122,11 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">suite('BoolanQueryTranslator', function() {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "(and (or f1:'k1' f2:'k2') f3:'k3')".length,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "((f1 @ \"k1\" || f2 @ \"k2\") && f3 @ \"k3\")");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> </span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testGroupError("missing open parentheis",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "and f1:'k1' f2:'k2')",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "|a|nd f1:'k1' f2:'k2')",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "not started with <(>");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> testExpression("value only: stirng: and: space",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1 keyword2' 'other keyword'",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1 keyword2'".length,</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -117,6 +139,10 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">suite('BoolanQueryTranslator', function() {</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1|keyword2' 'other keyword'",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'keyword1|keyword2'".length,</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "field @ \"keyword1\" || field @ \"keyword2\"");</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ testExpression("value only: stirng: prefix search",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'keyword*' 'other keyword'",</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "'keyword*'".length,</span>
<span class="diff-added" style="background-color: #aaffaa; color: #000000; display: block; white-space: pre">+ "field @^ \"keyword\"");</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> testExpression("value only: stirng: phrase",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'\"keyword1 keyword2\"' 'other keyword'",</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> "'\"keyword1 keyword2\"'".length,</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>