当前位置: 首页 > news >正文

东莞网站建设 家具织梦制作网站地图

东莞网站建设 家具,织梦制作网站地图,档案网站建设思考,享学课堂 移动互联网开发类 若 实现NativeScriptFactory接口。A factory to create instances of either {link ExecutableScript} or {link SearchScript} 只是一个工厂类#xff0c;仍需要 创建 上面二者之一。实际中 需 创建 类 继承 SearchScript接口的实现类AbstractSearchScript 的 子类 Abstra…类 若 实现NativeScriptFactory接口。A factory to create instances of either {link ExecutableScript} or {link SearchScript} 只是一个工厂类仍需要 创建 上面二者之一。实际中 需 创建 类 继承 SearchScript接口的实现类AbstractSearchScript 的 子类 AbstractLongSearchScript AbstractDoubleSearchScript。   我们使用 它是因为public ListNativeScriptFactory getNativeScripts() 需要返回的是工厂。      NativeScriptFactory /** * A factory to create instances of either {link ExecutableScript} or {link SearchScript}. Note, * if this factory creates {link SearchScript}, it must extend {link AbstractSearchScript}. * * see AbstractExecutableScript * see AbstractSearchScript * see AbstractLongSearchScript * see AbstractDoubleSearchScript */public interface NativeScriptFactory {   ExecutableScript 一般不用忽略 * An executable script, cant be used concurrently.   SearchScript  接口 AbstractSearchScript 核心类提供了绝大部分功能的实现 /** * A base class for any script type that is used during the search process (custom score, aggs, and so on). * p * If the script returns a specific numeric type, consider overriding the type specific base classes * such as {link AbstractDoubleSearchScript} and {link AbstractLongSearchScript} * for better performance. * p * The use is required to implement the {link #run()} method. */public abstract class AbstractSearchScript extends AbstractExecutableScript implements LeafSearchScript {   它 的核心是 属性 private LeafSearchLookup lookup; private Scorer scorer; 所有方法的实现同和这两个属性有关。 setLookup实现lookup的初始化 通过SearchLookup调用lookup.getLeafSearchLookup(context)实现 searchLookUp则通过DefaultSearchContext.lookup()实现初始化   lookup():  getQueryShardContext().lookup(); DefaultSearchContext则通过createContext实现初始化 也就是通过QueryShardContext.lookup() 实现。 QueryShardContext  lookup new SearchLookup(getMapperService(), indexFieldDataService, types);   其主要属性 及初始化  public class SearchLookup { final DocLookup docMap; final SourceLookup sourceLookup; final FieldsLookup fieldsLookup; public SearchLookup(MapperService mapperService, IndexFieldDataService fieldDataService, Nullable String[] types) { docMap new DocLookup(mapperService, fieldDataService, types); sourceLookup new SourceLookup(); fieldsLookup new FieldsLookup(mapperService, types); }   public class FieldsLookup { private final MapperService mapperService; Nullable private final String[] types; FieldsLookup(MapperService mapperService, Nullable String[] types) { this.mapperService mapperService; this.types types; }   然后追踪 传参的来源 queryShardContext.setTypes(ShardSearchRequest.types());   LocalTransport.sendRequest()   targetTransport.receiveMessage(version, data, action, requestId, this);     processReceivedMessage(data, action, sourceTransport, version, requestId);       StreamInput stream StreamInput.wrap(data);       handleRequest(stream, requestId, data.length, sourceTransport, version);         request.readFrom(stream);           TaskId.readFromStream(in);             ShardSearchTransportRequest.readFrom()               shardSearchLocalRequest.innerReadFrom(in);                   types in.readStringArray(); 总结 数据有了直接用    plsSearchScript 继承自AbstractSearchScript 类。  覆写了runrun方法会执行plsExScript接口的run(). 我们只需要提供一个实现plsExScirpt接口的类  转载于:https://www.cnblogs.com/ydxblog/p/8074058.html
http://www.zqtcl.cn/news/728675/

相关文章:

  • 修文县生态文明建设局网站郑州制作网站哪家好
  • 泉州网站优化排名东莞长安做网站公司
  • 网站制作公司 顺的有口碑的赣州网站建设
  • 成都网站设计制作苏州新闻
  • 黑色网站设计iis 网站 红
  • 专业做家居的网站佛山做网站永网
  • 医疗网站建设讯息企业门户网站建设思路
  • 四川建设安全监督管理局网站网站传送门怎么做
  • 哪家网站做推广好优化师和运营区别
  • 鹰潭网站建设公司南宁行业平台开发公司
  • 织梦如何仿手机网站源码奉贤区专业建网站
  • 上海网站建设接单wordpress htaccess 404
  • 长春网站优化指导网站怎样做301跳转
  • 做网站域名是什么意思临沧网站开发
  • 怎么在网站上做网页专业图库网站 西安
  • 龙南建设局网站wordpress 购物导航网站
  • 做数据分析好看的网站自己做背景的网站
  • 做纸棋的网站制作什么网站做毕业设计
  • 上海易雅达网站建设公司广元网站开发
  • 网站备案注销北京优化健康宝
  • 网站地图怎么做XML深圳公共资源交易中心
  • 高碑店做网站的公司湛江专业建站推荐
  • 中国建设银行官网的网站首页c2c电子商务网站建设栏目结构图
  • 做网站的软件图标上海建站外贸
  • 保定网站建设推广成都移动端网站建设
  • 服务平台型网站做那个网站比较好
  • 网站做icp备案需要多久上海人才引进官网
  • 国外的设计网站app有什么好的免费网站做教育宣传语
  • 做期货都看那些网站淮北网
  • 网站建设的需求怎么写网站头条怎么做