>> Yes I think you're right. On reading the "lucene in action" chapted on >> highlighting I found it squirreled in the middle of the text. I get >> the >> feeling that whilst I have so far found query parser to be the primary >> method of building queries that this is not ht eprimary method used >> by other >> people. Otherwise I would have expected to see the first example in >> the book >> use query parser. So what I'm not quite sure is how come the norm >> is using >> the direct queries.
>Highlighting and QueryParser aren't related. How you build or >generate the Query object is irrelevant to the Highlighter. > >It is true that in my applications, use of QueryParser is only a >small piece of how the Query gets built and in one project I've >created an entirely different and custom expression parser (for >legacy syntax compatibility reasons, as well as to support >sophisticated SpanQuery constructions). > >I believe the first example in Lucene in Action does use QueryParser, >the Searcher.java code in Chapter 1. > > Erik Hi Erik, from my point of view Highlighter and QueryParser ARE related when talking about the process of highlighting. If you've generated your Query through the use of QueryParser then you really must call the Query.Rewrite before you pass the query to the scorer which goes on to the highlighter. When I said the first example what I meant was the first example in section 8.7 "Highlighting query terms". It looks like a very simple example but for me it was not a realistic example. When I see these things I want to cut and paste and use as a starting point but in this case it didn't do what I expected and I ended up confused.. Please take my comments as constructive feedback solely from my perspective. Please do not take it as criticism of your excellent book! -Gwyn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]