Hi<div><br></div><div>Thanks for the comments so far. I'v</div><div>Martin, the ESV hasFeature returns that it does in fact return true. Also, the problem with the KJV is that it does contain any headings apart from in the Psalms for example (like Psalm 1).<br>
</div><div><br></div><div>Troy, I tried with and without the leading * but same happens and it works in other searches. </div><div><br></div><div>I've found in the end that it seems to have only indexed the canonical headings. I.e. I get back results for heading:psalm (82 results, e.g. Ps 3:1 <span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">"A Psalm</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px"> </span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">of David</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">,</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px"> </span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">when he fled</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px"> </span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">from</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px"> </span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">Absalom</span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px"> </span><span style="color:rgb(102,102,153);font-family:Verdana;font-size:14px">his son"). Both OSIS fragments are "title". </span></div>
<div><br></div><div><title subType="x-preverse" type="section">Jesus Walks on the Water</title></div><div><title canonical="true" subType="x-preverse" type="section">A Psalm of David, when he fled from Absalom his son.</title></div>
<div><br></div><div>However, I see in here getHeadings() that there is a call to getCanonicalContent which basically returns immediately if the content that is passed is not canonical.</div><div><br></div><div>Any particular reason why that is for indexing headings?</div>
<div>Chris</div><div><br></div><div><br></div><br><div class="gmail_quote">On 15 August 2012 20:34, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>I also don't believe lucene allows *
prefixes on words-- only postfix. Have you tried simply:<br>
<br>
heading:water<div><div class="h5"><br>
<br>
<br>
<br>
On 08/15/2012 09:30 PM, Martin Denham wrote:<br>
</div></div></div><div><div class="h5">
<blockquote 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 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 href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a><br>
<a 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></fieldset>
<br>
<pre>_______________________________________________
jsword-devel mailing list
<a href="mailto:jsword-devel@crosswire.org" target="_blank">jsword-devel@crosswire.org</a>
<a href="http://www.crosswire.org/mailman/listinfo/jsword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/jsword-devel</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
jsword-devel mailing list<br>
<a href="mailto:jsword-devel@crosswire.org">jsword-devel@crosswire.org</a><br>
<a 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>