Return Lucene field name when a query is matched

2011-10-20 Thread damian2b
Hi, I was given a task to investigate whether it is possible to return Lucene field name when a query is matched. At the moment our application returns the usual matched docs, but the new requirement would be to also know which field matched the query (e.g. found in title, header, etc.). We

Re: Return Lucene field name when a query is matched

2011-10-20 Thread Mihai Caraman
igate whether it is possible to return Lucene > field name when a query is matched. > At the moment our application returns the usual matched docs, but the new > requirement would be to also know which field matched the query (e.g. found > in title, header, etc.). > We use Lucene 3.0.3

Re: Return Lucene field name when a query is matched

2011-10-20 Thread Ian Lea
out by query[title], query[content], query[header]. > But you'd have to the merge the results. Maybe there's a collector for this. > > 2011/10/20 damian2b > >> Hi, >> >> I was given a task to investigate whether it is possible to return Lucene >> fiel

Re: Return Lucene field name when a query is matched

2011-10-20 Thread Mead Lai
; > Evidently you can find out by query[title], query[content], > query[header]. > > But you'd have to the merge the results. Maybe there's a collector for > this. > > > > 2011/10/20 damian2b > > > >> Hi, > >> > >> I was

Re: Return Lucene field name when a query is matched

2011-10-21 Thread Ian Lea
ai Caraman >> wrote: >> > So now you have something like query[title,content,header,...]. >> > Evidently you can find out by query[title], query[content], >> query[header]. >> > But you'd have to the merge the results. Maybe there's a collector