@juneym just made a pull request for Elastica with the MoreLikeThis query:
Now it seems like the query is running under 0.16 but does not work under
0.17. The query looks the following:
[more_like_this] => Array*
(*
[fields] => Array*
(*
[0] => email*
[1] => content*
)*
[boost] => 1*
[like_text] => fake gmail sample*
[max_query_terms] => 1*
[percent_terms_to_match] => 0.3*
[min_term_freq] => 1*
[min_doc_freq] => 1*
[max_doc_freq] => *
[min_word_len] => 0*
[max_word_len] => 0*
[boost_terms] => 1*
)*
)*
And elasticsearch throws the following error
[2011-08-05 12:26:05,427][DEBUG][action.search.type ] [Lorna Dane]
[test][0], node[XC2VHqNjQsmuGCUIfVOPVA], [P], s[STARTED]: Failed to execute
[org.elasticsearch.action.search.SearchRequest@58c3d9ac] org.elasticsearch.search.query.QueryPhaseExecutionException: [test][0]:
query[like:fake gmail sample],from[0],size[10]: Query Failed [Failed to
execute main query]
at org.elasticsearch.search.query.QueryPhase.execute(QueryPhase.java:221)*
at
org.elasticsearch.search.SearchService.executeFetchPhase(SearchService.java:295)
at
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:224)
at
org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:204)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:191)
at
org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:177)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)* Caused by: java.io.IOException: Stream closed
Any idea what is wrong with this query? I tried to figure out what changed
between ES 0.16 and 0.17, but couldn't figure out what it is.
I also meet with this. The problem in "fields" parameter.
Here's a sample query and it don't work:
But if you remove the "fields", the query works
Offtop *
Shay, I have another question about relevance. MLT function in
ElasticSearch working not as good as in Solr, the problem in fields
weight. I have set "boost" for the fields in the mapping, but they are
ignored. Could you make that request could look like for the
query_string { "fields" : ["title^7", "tags^3", "categories^2",
"description"] } ?
Shay, I have another question about relevance. MLT function in
Elasticsearch working not as good as in Solr, the problem in fields
weight. I have set "boost" for the fields in the mapping, but they are
ignored. Could you make that request could look like for the
query_string { "fields" : ["title^7", "tags^3", "categories^2",
"description"] } ?
Yaroslav, "mlt_fields" or "mlt_fieldsafaf" is work, but it has no
effect Because the parameter "mlt_fields" for More Like This API,
not for More Like This Query
On Fri, Aug 5, 2011 at 6:30 PM, Vladimir Shkurin vshkurin@gmail.com wrote:
Yaroslav, "mlt_fields" or "mlt_fieldsafaf" is work, but it has no
effect Because the parameter "mlt_fields" for More Like This API,
not for More Like This Query
No need to delete anything, this section of the documentation is
correct. We just have to wait when will the new release of Lucene, or
maybe Shay can fix it earlier
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.