Re: Highlight only when all keywords match

2013-05-20 Thread Upayavira
I can't give you much advice on the topic. I have reviewed the HighlightComponent and found it complex and hard to follow, so expect it to be challenging. Upayavira On Mon, May 20, 2013, at 01:28 PM, Sandeep Mestry wrote: > Thanks Upayavira for that valuable suggestion. > > I believe overriding

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
Thanks Upayavira for that valuable suggestion. I believe overriding highlight component should be the way forward. Could you tell me if there is any existing example or which methods I should particularly override? Thanks, Sandeep On 20 May 2013 12:47, Upayavira wrote: > If you are saying tha

Re: Highlight only when all keywords match

2013-05-20 Thread Upayavira
If you are saying that you want to change highlighting behaviour, not query behaviour, then I suspect you are going to have to interact with the java HighlightComponent. If you can work out how to update that component to behave as you wish, you could either subclass it, or create your own implemen

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
I doubt if that will be the correct approach as it will be hard to generate the query grammar considering we have support for phrase, operator, wildcard and group queries. That's why I have kept it simple and only passing the query text with minimal parsing (escaping lucene special characters) to c

Re: Highlight only when all keywords match

2013-05-20 Thread Jaideep Dhok
If you know all fields that need to be queried, you can rewrite it as - (assuming, f1, f2 are the fields that you have to search) (f1:kw1 AND f1:kw2 ... f1:kwn) OR (f2:kw1 AND f2:kw2 ... f2:kwn) - Jaideep On Mon, May 20, 2013 at 4:22 PM, Sandeep Mestry wrote: > Hi Jaideep, > > The edismax conf

Re: Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
Hi Jaideep, The edismax config I have posted mentioned that the default operator is AND. I am sorry if I was not clear in my previous mail, what I need really is highlight a field when all search query terms present. The current highlighter works for *any* of the terms match and not for *all* term

Re: Highlight only when all keywords match

2013-05-20 Thread Jaideep Dhok
Sandeep, If you AND all keywords, that should be OK? Thanks Jaideep On Mon, May 20, 2013 at 3:44 PM, Sandeep Mestry wrote: > Dear All, > > I have a requirement to highlight a field only when all keywords entered > match. This also needs to support phrase, operator or wildcard queries. > I'm us

Highlight only when all keywords match

2013-05-20 Thread Sandeep Mestry
Dear All, I have a requirement to highlight a field only when all keywords entered match. This also needs to support phrase, operator or wildcard queries. I'm using Solr 4.0 with edismax because the search needs to be carried out on multiple fields. I know with highlighting feature I can configure