<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It doesn't allow leading wildcards.<div><br></div><div>In more recent versions of Lucene it is possible to turn on the capability. But there are dire warnings about it and that it is not a good idea.</div><div><br></div><div><br><div><div>On Aug 15, 2012, at 3:34 PM, "Troy A. Griffitts" <<a href="mailto:scribe@crosswire.org">scribe@crosswire.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">I also don't believe lucene allows *
prefixes on words-- only postfix. Have you tried simply:<br>
<br>
heading:water<br>
<br>
<br>
<br>
On 08/15/2012 09:30 PM, Martin Denham wrote:<br>
</div>
<blockquote cite="mid:CAJ30_ONT_WPdXoyqOKGdDiuf2e=nUV+t8C_Qhg07Pmwko6KRSg@mail.gmail.com" type="cite">I think there might be a problem with index creation
code or .conf files. Comparing the Strongs index creation code
(which works) with Headings:
<div><br>
</div>
<div>In LuceneIndex you see:</div>
<div>
<div> boolean hasStrongs =
book.getBookMetaData().hasFeature(FeatureType.STRONGS_NUMBERS);</div>
<div> boolean hasHeadings =
book.getBookMetaData().hasFeature(FeatureType.HEADINGS);</div>
</div>
<div><br>
</div>
<div>Then in kjv.conf you see various attributes relating to
Strongs and Headings but I believe the 3rd one is the one used
by the above code in LuceneIndex::</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>
<div>GlobalOptionFilter=OSISStrongs</div>
</div>
<div>
<div>GlobalOptionFilter=OSISHeadings</div>
</div>
<div>Feature=StrongsNumbers</div>
</blockquote>
<div><br>
</div>
<div>However, in a module that contains headings like ESV in
esv.conf there is no </div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>
<div>Feature=Headings</div>
</div>
</blockquote>
<div><br>
</div>
<div>So it may be that the headings do not make it into the index
because of the following in LuceneIndex:</div>
<div>
<div> if (hasHeadings) {</div>
<div> addField(doc, headingField,
OSISUtil.getHeadings(osis));</div>
<div> }</div>
</div>
<div><br>
</div>
<div>but DM will be able to confirm if that is the problem.</div>
<div><br>
</div>
<div>Martin</div>
<div><br>
<div class="gmail_quote">On 15 August 2012 20:06, Chris Burrell
<span dir="ltr"><<a moz-do-not-send="true" 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">Hi all
<div><br>
</div>
<div>I'm trying to search the headings of a particular book
(say ESV).</div>
<div><br>
</div>
<div>
I'm using the following query "heading:*water*" which I
was hoping should match "Jesus walks on Water" (case
doesn't seem to make a difference).</div>
<div>
<div><br>
</div>
<div>My code is simply: bible.find(new
DefaultSearchRequest(query, modifier));</div>
</div>
<div><br>
</div>
<div>Has anyone else managed to get this working?</div>
<div><br>
</div>
<div>Chris</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>final long start = System.currentTimeMillis();</div>
<div><br>
</div>
<div> final DefaultSearchModifier modifier = new
DefaultSearchModifier();</div>
<div> modifier.setRanked(ranked);</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><br>
</div>
<div> final Key results;</div>
<div><br>
</div>
<div> // TODO JS-228 raised for thread-safety</div>
<div> synchronized (this) {</div>
<div> results = bible.find(new
DefaultSearchRequest(query, modifier));</div>
<div> }</div>
<div><br>
</div>
<div> LOGGER.debug("[{}] verses found.",
results.getCardinality());</div>
<div><br>
</div>
<div> if (ranked) {</div>
<div> rankAndTrimResults(results,
MAX_RESULTS);</div>
<div> } else {</div>
<div> trimResults(results, MAX_RESULTS);</div>
<div> }</div>
<div> LOGGER.debug("Trimmed down to [{}].",
results.getCardinality());</div>
<div><br>
</div>
<div> final long startRefs =
System.currentTimeMillis();</div>
<div> final List<SearchEntry>
resultPassages = getPassagesForResults(bible, results);</div>
<div> final long endRefs =
System.currentTimeMillis();</div>
<div><br>
</div>
<div> return getSearchResult(query, start,
startRefs, endRefs, resultPassages);</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>
_______________________________________________<br>
jsword-devel mailing list<br>
<a moz-do-not-send="true" href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a moz-do-not-send="true" href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a><br>
<br>
</blockquote>
</div>
<br>
</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>
</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></body></html>