Re: Highlighting query results, my method is too crude, but how to improve it?

2023-02-20 Thread Dawid Weiss
You can use two different queries - the query is just used as a source of information on what to highlight (it can even be completely different and unrelated to the query that retrieved the documents). Separately, unified highlighter is great but you may also try the matches API - I found it to be

RE: Highlighting query results, my method is too crude, but how to improve it?

2023-02-20 Thread Trevor Nicholls
Well I don't know; I suppose that's part of my question. It's not immediately obvious to me that the "query" in these two lines: Highlighter highlighter = new Highlighter( htmlFormatter, new QueryScorer( query )); TopDocs results = searcher.search( query, max ); has to be the same. Maybe yo

Re: Highlighting query results, my method is too crude, but how to improve it?

2023-02-20 Thread Mikhail Khludnev
Hello, Maybe I'm missing some point. But, can you highlight another query than one you search for? On Mon, Feb 20, 2023 at 5:07 PM Trevor Nicholls wrote: > Sorry I apologize for this being a bit long and for explaining the problem > at the very bottom after all the background, rather than starti

Highlighting query results, my method is too crude, but how to improve it?

2023-02-20 Thread Trevor Nicholls
Sorry I apologize for this being a bit long and for explaining the problem at the very bottom after all the background, rather than starting with it at the top. I thought it was easier to explain like this, please bear with me! So I've indexed a library of technical documentation, and the index