<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I think that "leading" is clear. It is also "a" range. Feel free to improve the comment.<div><br></div><div>The technical constraint is that it is not part of a general search and is applied after. Allowing it at the end would also be reasonable.<div><br></div><div>We don't allow for:</div><div>([GEN] Aaron) OR (([MATT] Jesus) AND ([MATT] Mary))</div><div>That would take a lot of work.</div><div><br></div><div>Which is get all the Aaron references from Genesis and the Matthew references that contain both Jesus and Mary.<br><div><br></div><div>We also allow one ~n (where n is a number). This will split the search into two parts and do a verse proximity search.</div><div>Aaron ~5 Moses means get all the verses containing Aaron that are within 5 of those mentioning Moses. </div><div>Basically ~5 Moses is converted to a range. The search result for Moses is blurred by 5 and then intersected with Aaron search results.</div><div><br></div><div>I might have the logic backward. It may be that Aaron ~5 is converted to the range.</div><div><br></div><div>But Aaron~0.5 Moses is a lucene search that applies fuzzy search to Aaron and boosts the search for Aaron.</div><div><br></div><div><div>In Him,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM Smith</div><div><br><div><div>On Apr 26, 2014, at 8:29 AM, Chris Burrell <<a href="mailto:chris@burrell.me.uk">chris@burrell.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">The code in question:<div><br></div><div>Matcher rangeMatcher = RANGE_PATTERN.matcher(sought);<br></div><div><br></div><div><div> /**</div><div> * The pattern of a range. This is anything that is contained between a</div>
<div> * leading [] (but not containing a [ or ]), with a + or - optional prefix,</div><div> * perhaps surrounded by whitespace.</div><div> */</div><div> private static final Pattern RANGE_PATTERN = Pattern.compile("^\\s*([-+]?)\\[([^\\[\\]]+)\\]\\s*");</div>
</div><div><br></div><div>The comment doesn't seem to make clear it should be at the start... Not sure if there is a technical constraint...</div><div>Chris</div><div><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 26 April 2014 13:28, Chris Burrell <span dir="ltr"><<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello<div><br></div><div>Just wondering if there is any particular reason for the range pattern to be forced to be the starting block of the query...</div><div><br></div><div>i.e. </div><div><br></div><div>
+[Gen] Abraham (works)</div>
<div>Abraham +[Gen] (doesn't work).</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chris</div><div><br></div></font></span></div>
</blockquote></div><br></div>
_______________________________________________<br>jsword-devel mailing list<br><a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>http://www.crosswire.org/mailman/listinfo/jsword-devel<br></blockquote></div><br></div></div></div></div></body></html>