couchdb-lucene
couchdb-lucene copied to clipboard
highlights=x
hello, I have an index build with { var ret=new Document(); ret.add(doc.id, {'field':'id','type':'int'}); ret.add(doc.txt,{'store':'yes','termvector':'with_positions_offsets'}); return ret } } that index is working, but when I get the results : {"limit":25,"etag":"46e09727a512","fetch_duration":2,"q":"default:jahrhunderts","search_duration":0,"total_rows":380,"skip":0,"rows":[{"id":"93898_c0059","score":2.3190693855285645,"highlights":{"default":[]},"fields":{"default":"GEMÄLDE DES 19. JAHRHUNDERTS"}},{"id":"93898_c0092","score":2.3190693855285645,"highlights":{"default":[]},"fields":{"default":"GEMÄLDE DES 19. JAHRHUNDERTS"}},
the highlights is alway empty ! I use couchdb 1.5.0 and the git verstion of couch-lucene, and tomcat 7.0.40, and java 1.7.0 on debian whezzy.
does I missed something ?
termvectors, which power highlights, currently broken on master while I did the big Lucene 4.7 upgrade. Use the latest version or go back on master to before that change. I'll have it fixed before the 1.0 release.
what query parameters are you using?
Hi robert,
the query http://couchdb1:5984/_fti/local/catalogues/_design/cataloguepage/by_txt?q=Abbaye&highlights=10
response extract {"limit":25,"etag":"ccd463570545","fetch_duration":145,"q":"default:abbaye","search_duration":178,"total_rows":220,"skip":0,"rows":[{"id":"92093_c0066","score":1.7958104610443115,"highlights":{"default":[]},"fields":{"default":"ABBAYE DE MONDAYE\r\nPRÉMONTRÉS\r\nJUAYE-MONDAYE\r\nCALVADOS\r\nPOUR LA RESTAURATION DE LA FERME CONVENTUELLE\r\nET LA RESTITUTION DU PARVIS DE L'ABBATIALE\r\n"}}, I found another probleme with
http://couchdb1:5984/_fti/local/catalogues/_design/cataloguepage/by_txt?q=Abbaye and idcatalogue
{"limit":200,"etag":"ccea5d3956ec","fetch_duration":523,"q":"default:abbaye idcatalogue:`\b\u0000\u0005X\u0015","search_duration":4,"total_rows":304,"skip":0,"rows":[{"id":"93205_c0053","score":8.486856460571289,"fields":... {"id":"81695_c0015","doc":{"idauctioneer":5394,"_rev":"1-7738f0956555c0261efe9a0f42e559f5","ref":3831,"title":"TABLEAUX ABSTRAITS ET CONTEMPORAINS - SCULPTURES","_id":"81695_c0015","sales":"[170297]","year":2011,"offset":2,"type":"cataloguepage","idcatalogue":81695,"txt": the result do not contain only idcatalogue=93205, as you can see in the last response. (you get the index definition in my first mail) I am currently on the git/master depot, should I use another branch ?
another problem, we use the war file with tomcat 7.40.0, and we have to remove manualy the line
in the WEB-INF/web.xml to run it with tomcat.
Le Mercredi 9 avril 2014 23h05, Robert Newson [email protected] a écrit :
what query parameters are you using? — Reply to this email directly or view it on GitHub.
you need to say "AND" not "and" to do a Boolean and operation (https://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html)
so powerful, with the fuzzy operator support, (that was my next question). sorry I doesn't see the link to lucene query parser in the doc.
I have another probleme, I have put the couchdb-lucene on tomcat mounted as ROOT, because it don't work on a directory as (localhost:8080/couchdb-lucene). it work fine like that.
Le Jeudi 10 avril 2014 9h16, Robert Newson [email protected] a écrit :
you need to say "AND" not "and" to do a Boolean and operation (https://lucene.apache.org/core/4_6_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html) — Reply to this email directly or view it on GitHub.
The deploy-inside-tomcat piece is a contribution and I have to confess that I never run couchdb-lucene that way, I use the bin/run script that I wrote. There's a ticket about making the war relocatable that I've never had time to validate or keep current, so I would consider deploying couchdb-lucene in a war as an expert option, I can't really help with that.
I will dig into the termvector/highlight issue at the weekend though. I misspoke earlier though, the include_termvectors=true option is temporarily removed but neither the index-time termvector settings or the highlighting options were removed. Perhaps they're failing here for a different reason. Could you try putting the highlighting field somewhere other than 'default'?