<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">This sounds like a bug. I think that
[HhGg]0*[1-9][0-9]* where the value is a valid Strong's number
should be equivalent.<br>
<br>
That is the case of G and H should not matter. Nor should the
number of leading 0's.<br>
<br>
We should add a test case for this as well as enter a Jira issue.<br>
<br>
In Him,<br>
DM<br>
<br>
On 07/09/2012 02:11 PM, Chris Burrell wrote:<br>
</div>
<blockquote
cite="mid:CACQnaRUxL2E76+8Y06Y0=duVwo30KjFsnb5yOmyN_+g2XQKf-Q@mail.gmail.com"
type="cite">Hi
<div><br>
</div>
<div>Using a normal ranked search, I seem to be hitting some bug
for a "strong" search. If I search for g0016, G016 or G16 I get
results back. For G0016 however, it comes back with nothing.</div>
<div><br>
</div>
<div>Code I used is below. Any ideas? The obvious work around is
to do things in lower case, but I assume that is a bug?</div>
<div>Chris</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>final DefaultSearchModifier modifier = new
DefaultSearchModifier();</div>
<div><br>
</div>
<div> modifier.setRanked(true);</div>
<div> modifier.setMaxResults(MAX_RESULTS);</div>
<div><br>
</div>
<div> final Book bible =
this.av11nService.getBookFromVersion(version);</div>
<div><br>
</div>
<div> try {</div>
<div> final Key results = bible.find(new
DefaultSearchRequest(query, modifier));</div>
<div><br>
</div>
<div> final List<SearchEntry> resultPassages =
new ArrayList<SearchEntry>();</div>
<div> final Iterator<Key> rangeIter =
((Passage) results).rangeIterator(RestrictionType.CHAPTER);</div>
<div> // boundaries.</div>
<div> while (rangeIter.hasNext()) {</div>
<div> final Key range = rangeIter.next();</div>
<div> final BookData data = new BookData(bible,
range);</div>
<div> final String canonicalText =
OSISUtil.getCanonicalText(data.getOsisFragment());</div>
<div> resultPassages.add(new
SearchEntry(range.getName(), canonicalText));</div>
<div> }</div>
<div><br>
</div>
<div> final SearchResult r = new SearchResult();</div>
<div> r.setResults(resultPassages);</div>
<div> r.setQuery(query);</div>
<div> r.setMaxReached(MAX_RESULTS ==
resultPassages.size());</div>
<div><br>
</div>
<div> return r;</div>
<div> } catch (final BookException e) {</div>
<div> throw new StepInternalException("Unable to
search for " + query + " with Bible " + version, e);</div>
<div> }</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
jsword-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://www.crosswire.org/mailman/listinfo/jsword-devel">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>