1

Im implementing zend-lucene search on my site, and I have indexing going well, and I can search.

But the results just come back with the records that have a hit in order of score without the content (other than extra fields).

Id like to be able to show where in the content the match was. Is this possible?

I know that the content is index but not stored for space reasons. So do I have to mix this with a SQL query if I want to return back a excerpt?

Also... Is it possible to see where the match was made? Like title vs author vs content?

jakub.g
  • 38,512
  • 12
  • 92
  • 130
Adam Meyer
  • 1,505
  • 1
  • 19
  • 28

1 Answers1

0

The Zend Lucene alone does not support it. I solved it by storing the search content as text and using following function from this threar to display the excerpt: How to generate excerpt with most searched words in PHP?

Community
  • 1
  • 1
mgo
  • 174
  • 6