Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MoreLikeThisCondition

提供like查询。

example

import * as es from 'es' 
let client=es.newClient('axis_esClient')
let moreLikeThis: es.MoreLikeThisCondition = {
    fields: ["title", "description"],
    like: "once upon a time",
    min_term_freq: 1,
    max_query_terms: 12
}
let querydsl:es.Query={
    "more_like_this":moreLikeThis
}
let cnt = client.updateByQuery("indexName", querydsl, "newScript")

Hierarchy

  • MoreLikeThisCondition

Index

Properties

Optional analyzer

analyzer: string

analyzer:用于分析自由格式文本的分析器。

Optional boost

boost: number

boost: 浮点数,用作与筛选器查询匹配的每个文档的常量相关性分数。

Optional boost_terms

boost_terms: number

boost_terms:所形成的查询中的每个术语都可以通过其 tf-idf 分数进一步提升。

Optional fail_on_unsupported_field

fail_on_unsupported_field: boolean

fail_on_unsupported_field:控制如果任何指定字段不属于受支持的类型(text或keyword),查询是否应失败

Optional fields

fields: string[]

fields:查询的字段数组

Optional include

include: boolean

include: 指定输入文档是否也应包含在返回的搜索结果中。

Optional like

like: string

Optional max_doc_freq

max_doc_freq: number

max_doc_freq:最大文档频率,高于该频率的术语将从输入文档中被忽略。

Optional max_query_terms

max_query_terms: number

max_query_terms: 将选择的查询词的最大数量。

Optional max_word_length

max_word_length: number

max_word_length:最大字长,超过该长度的术语将被忽略。

Optional min_doc_freq

min_doc_freq: number

min_doc_freq:最小文档频率,低于该频率的术语将从输入文档中被忽略。

Optional min_term_freq

min_term_freq: number

min_term_freq:最小术语频率,低于该频率的术语将从输入文档中被忽略。

Optional min_word_length

min_word_length: number

min_word_length:最小字长,低于该长度的术语将被忽略。

Optional minimum_should_match

minimum_should_match: string

minimum_should_match:形成析取查询后,此参数控制必须匹配的术语数量。

Optional stop_words

stop_words: string[]

stop_words:停用词数组。该集合中的任何单词都被视为“无趣”并被忽略。

Optional unlike

unlike: string