[jsword-devel] Search query bug?

DM Smith dmsmith at crosswire.org
Mon Jul 9 11:22:02 MST 2012


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.

That is the case of G and H should not matter. Nor should the number of 
leading 0's.

We should add a test case for this as well as enter a Jira issue.

In Him,
     DM

On 07/09/2012 02:11 PM, Chris Burrell wrote:
> Hi
>
> 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.
>
> 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?
> Chris
>
>
>
>
> final DefaultSearchModifier modifier = new DefaultSearchModifier();
>
>         modifier.setRanked(true);
>         modifier.setMaxResults(MAX_RESULTS);
>
>         final Book bible = this.av11nService.getBookFromVersion(version);
>
>         try {
>             final Key results = bible.find(new 
> DefaultSearchRequest(query, modifier));
>
>             final List<SearchEntry> resultPassages = new 
> ArrayList<SearchEntry>();
>             final Iterator<Key> rangeIter = ((Passage) 
> results).rangeIterator(RestrictionType.CHAPTER);
>             // boundaries.
>             while (rangeIter.hasNext()) {
>                 final Key range = rangeIter.next();
>                 final BookData data = new BookData(bible, range);
>                 final String canonicalText = 
> OSISUtil.getCanonicalText(data.getOsisFragment());
>                 resultPassages.add(new SearchEntry(range.getName(), 
> canonicalText));
>             }
>
>             final SearchResult r = new SearchResult();
>             r.setResults(resultPassages);
>             r.setQuery(query);
>             r.setMaxReached(MAX_RESULTS == resultPassages.size());
>
>             return r;
>         } catch (final BookException e) {
>             throw new StepInternalException("Unable to search for " + 
> query + " with Bible " + version, e);
>         }
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20120709/16367da0/attachment.html>


More information about the jsword-devel mailing list