Fly365
(Fly365)
June 1, 2016, 1:21am
1
Use solr to set the boost, but ES did not find can set boost, please help about this question,thanks!
bulkRequest.add(client.prepareIndex("twitter", "tweet", "8")
.setSource(XContentFactory.jsonBuilder()
.startObject()
.field("user", "tom")
.field("postDate", new Date())
.field("message", "score")
.endObject()));
SolrInputDocument solrDoc = new SolrInputDocument();
//solrDoc.setDocumentBoost (documentBoost);
cbuescher
(Christoph)
June 1, 2016, 10:37am
2
Document level boost used to be supported via the _boost
field, but has been deprecated. Here's an explanation why and a way to archive the desired effect using a function_score
query: https://www.elastic.co/guide/en/elasticsearch/reference/1.7/mapping-boost-field.html
Fly365
(Fly365)
June 24, 2016, 6:49am
3
thanks a lot,at this time ,i used setBoot in query,dot set boost when insert a document .thank you very much!