hit-highlighting

using hit highlighter in lucene

I have two questions regarding hit highlighter provided with apache lucene: see this function could you explain the use of token stream parameter. I have several large lucene document containing many fields and each field has some strings in it. Now I have found the most relevant document for a particular query. Now this document was f...

Making dtSearch highlight one hit per phrase, rather than one hit per word-in-a-phrase

I'm using dtSearch to highlight text search matches within a document. The code to do this, minus some details and cleanup, is roughly along these lines: SearchJob sj = new SearchJob(); sj.Request = "\"audit trail\""; // the user query sj.FoldersToSearch.Add(path_to_src_document); sj.Execute(); FileConverter fileConverter = new FileConv...

lucene get matched terms in query

what is the best way to find out which terms in a query matched against a given document returned as a hit in lucene? I have tried a weird method involving hit highlighting package in lucene contrib and also a method that searches for every word in the query against the top most document ("docId: xy AND description: each_word_in_query")...

Sunspot highlights not appearing

I've gone through the docs in github: http://github.com/outoftime/sunspot to find solutions for highlighting, but it doesn't seem to work for me. My Job model has something like this block (omitted some fields on purpose): searchable do text :name string :name, :stored => true time :updated_at time :created_at t...