rnewson / couchdb-lucene

Enables full-text searching of CouchDB documents using Lucene
Apache License 2.0
769 stars 147 forks source link

Are highlights working using CouchDB 2.0 #244

Open rvanzon opened 7 years ago

rvanzon commented 7 years ago

Hi, I am trying to get highlights working.

With this query it's not working (the highlights array is not present): http://localhost:5986/_fti/local/my_database/_design/search/by_body?q=keyword&highlights=10

Should this work?

rnewson commented 7 years ago

It should work the same as before. I can't dig into this right now but hopefully at the weekend, thanks for the report.

rvanzon commented 7 years ago

okay great! Maybe it's something with CouchDB? If I can assist, please tell me.

rnewson commented 7 years ago

as long as you got any results with your query, the &highlights=10 should have done something, so I think this is a couchdb-lucene bug. hopefully a simple one :)

rvanzon commented 7 years ago

I just checked again, to be sure. There are results as expected, but no highlights:

{"q":"default:gras","fetch_duration":10,"total_rows":812,"limit":25,"search_duration":0,"etag":"1c68201f053f4","skip":0,"rows": [ ... ]}

(btw, I am pretty content with search_duration: 0 ;)

rnewson commented 7 years ago

:)

rnewson commented 7 years ago

sorry for huge delay on this. I did try to get highlights to show locally without luck, so it does seem to be not working. I can't see why just yet though.