Re: Token Stream with Offsets (Token Sources class)

2013-04-07 Thread Simon Willnauer
hey, first, please don't crosspost! second, can you provide more infos like that part where you index the data. maybe something that is selfcontained? simon On Mon, Apr 8, 2013 at 1:16 AM, vempap wrote: > Hi, > > I've the following snippet code where I'm trying to extract weighted span > term

Token Stream with Offsets (Token Sources class)

2013-04-07 Thread vempap
Hi, I've the following snippet code where I'm trying to extract weighted span terms from the query (I do have term vectors enabled on the fields): File path = new File( ""); FSDirectory directory = FSDirectory.open(path);

Re: Highlighting search words in full document

2013-04-07 Thread Erick Erickson
Well, at that point you have a doc ID presumably. When you format your responses to the initial query, the link you provide for each verse is something like yourserver/solr/collection1/select?q=id:chapter_id&hl=true&hl.fl=fullchaptertext&hl.q=. So when the user clicks on it, you get a response wi

Re: Highlighting search words in full document

2013-04-07 Thread Darren Hoffman
Thanks for the response, Erick. I have implemented just what you have described. The question I have is how to highlight the searched words in the entire chapter that were highlighted in the selected verse. Thanks! Sent from my iPhone On Apr 7, 2013, at 5:38 AM, Erick Erickson wrote: > Soun

Re: Reuse Document

2013-04-07 Thread Wei Wang
As long as it is cheap to create a Document object, it would be fine. I guess we will probably always create new Document in such case. On Sun, Apr 7, 2013 at 5:31 AM, Michael McCandless < luc...@mikemccandless.com> wrote: > Document doesn't have any way to clear all fields today ... but, > likel

Re: Highlighting search words in full document

2013-04-07 Thread Erick Erickson
Sounds like what you want to do is 1> with each verse, store the chapter ID. This could be the ID of another document. There's no requirement that all docs in an index have the same structure. In this case, you could have a "type" field in each doc with values like "verse" and "chapter". For your v

Re: Reuse Document

2013-04-07 Thread Michael McCandless
Document doesn't have any way to clear all fields today ... but, likely this wouldn't really buy you much performance if it did vs just creating a new Document when the fields changed. Mike McCandless http://blog.mikemccandless.com On Sun, Apr 7, 2013 at 2:41 AM, Wei Wang wrote: > Lucene encour