mtianyan / FunpySpiderSearchEngine

Word2vec 千人千面 个性化搜索 + Scrapy2.3.0(爬取数据) + ElasticSearch7.9.1(存储数据并提供对外Restful API) + Django3.1.1 搜索
MIT License
923 stars 315 forks source link

本地部署运行后搜索问题 #32

Closed mDarker1 closed 3 years ago

mDarker1 commented 3 years ago

Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\exception.py", line 47, in inner response = get_response(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\base.py", line 179, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\views\generic\base.py", line 70, in view return self.dispatch(request, *args, *kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\views\generic\base.py", line 98, in dispatch return handler(request, args, kwargs) File "F:\pythonbishe\searchspider\mtianyanSearch-master\search\views.py", line 102, in get suggestions_question = s_question.execute() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch_dsl\search.py", line 698, in execute *self._params File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\client\utils.py", line 152, in _wrapped return func(args, params=params, headers=headers, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\client__init__.py", line 1617, in search body=body, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\transport.py", line 392, in perform_request raise e File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\transport.py", line 365, in perform_request timeout=timeout, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 269, in perform_request self._raise_error(response.status, raw_data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\connection\base.py", line 301, in _raise_error status_code, error_message, additional_info elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'no mapping found for field [suggest]')

mDarker1 commented 3 years ago

elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'no mapping found for field [suggest]') 求问为什么找不到suggest字段

mtianyan commented 3 years ago

elasticsearch的版本是否是7.9.1呢

mDarker1 commented 3 years ago

是的  是elasticsearch7.9.1版本

------------------ 原始邮件 ------------------ 发件人: "mtianyan/FunpySpiderSearchEngine" @.>; 发送时间: 2021年4月28日(星期三) 晚上10:29 @.>; @.**@.>; 主题: Re: [mtianyan/FunpySpiderSearchEngine] 本地部署运行后搜索问题 (#32)

elasticsearch的版本是否是7.9.1呢

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mDarker1 commented 3 years ago

您先休息  我明早再试试再详细给您发过去问题

------------------ 原始邮件 ------------------ 发件人: "mtianyan/FunpySpiderSearchEngine" @.>; 发送时间: 2021年4月28日(星期三) 晚上10:29 @.>; @.**@.>; 主题: Re: [mtianyan/FunpySpiderSearchEngine] 本地部署运行后搜索问题 (#32)

elasticsearch的版本是否是7.9.1呢

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mDarker1 commented 3 years ago

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. [2021-04-29T14:46:17,206][INFO ][o.e.n.Node ] [CHINA-20190404R] version[7.9.1], pid[25864], build[default/zip/083627f112ba94dffc1232e8b42b73492789ef91/2020-09-01T21:22:21.964974Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/12.0.2/12.0.2+10] [2021-04-29T14:46:17,219][INFO ][o.e.n.Node ] [CHINA-20190404R] JVM home [C:\Program Files\Java\jdk-12.0.2] [2021-04-29T14:46:17,220][INFO ][o.e.n.Node ] [CHINA-20190404R] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms5g, -Xmx5g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=C:\Users\Administrator\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=2684354560, -Delasticsearch, -Des.path.home=F:\pythonbishe\searchspider\elasticsearch-7.9.1\elasticsearch-7.9.1, -Des.path.conf=F:\pythonbishe\searchspider\elasticsearch-7.9.1\elasticsearch-7.9.1\config, -Des.distribution.flavor=default, -Des.distribution.type=zip, -Des.bundled_jdk=true] [2021-04-29T14:46:21,015][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [aggs-matrix-stats] [2021-04-29T14:46:21,015][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [analysis-common] [2021-04-29T14:46:21,016][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [constant-keyword] [2021-04-29T14:46:21,016][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [flattened] [2021-04-29T14:46:21,017][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [frozen-indices] [2021-04-29T14:46:21,017][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [ingest-common] [2021-04-29T14:46:21,018][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [ingest-geoip] [2021-04-29T14:46:21,018][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [ingest-user-agent] [2021-04-29T14:46:21,018][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [kibana] [2021-04-29T14:46:21,019][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [lang-expression] [2021-04-29T14:46:21,019][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [lang-mustache] [2021-04-29T14:46:21,019][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [lang-painless] [2021-04-29T14:46:21,020][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [mapper-extras] [2021-04-29T14:46:21,021][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [parent-join] [2021-04-29T14:46:21,021][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [percolator] [2021-04-29T14:46:21,021][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [rank-eval] [2021-04-29T14:46:21,022][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [reindex] [2021-04-29T14:46:21,022][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [repository-url] [2021-04-29T14:46:21,023][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [search-business-rules] [2021-04-29T14:46:21,023][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [searchable-snapshots] [2021-04-29T14:46:21,023][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [spatial] [2021-04-29T14:46:21,025][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [tasks] [2021-04-29T14:46:21,025][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [transform] [2021-04-29T14:46:21,026][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [transport-netty4] [2021-04-29T14:46:21,027][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [vectors] [2021-04-29T14:46:21,027][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [wildcard] [2021-04-29T14:46:21,027][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-analytics] [2021-04-29T14:46:21,028][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-async] [2021-04-29T14:46:21,028][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-async-search] [2021-04-29T14:46:21,029][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-autoscaling] [2021-04-29T14:46:21,029][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-ccr] [2021-04-29T14:46:21,029][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-core] [2021-04-29T14:46:21,030][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-data-streams] [2021-04-29T14:46:21,030][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-deprecation] [2021-04-29T14:46:21,031][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-enrich] [2021-04-29T14:46:21,031][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-eql] [2021-04-29T14:46:21,031][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-graph] [2021-04-29T14:46:21,032][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-identity-provider] [2021-04-29T14:46:21,032][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-ilm] [2021-04-29T14:46:21,033][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-logstash] [2021-04-29T14:46:21,034][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-ml] [2021-04-29T14:46:21,034][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-monitoring] [2021-04-29T14:46:21,035][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-ql] [2021-04-29T14:46:21,035][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-rollup] [2021-04-29T14:46:21,036][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-security] [2021-04-29T14:46:21,037][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-sql] [2021-04-29T14:46:21,037][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-stack] [2021-04-29T14:46:21,038][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-voting-only-node] [2021-04-29T14:46:21,039][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded module [x-pack-watcher] [2021-04-29T14:46:21,040][INFO ][o.e.p.PluginsService ] [CHINA-20190404R] loaded plugin [analysis-ik] [2021-04-29T14:46:21,520][INFO ][o.e.e.NodeEnvironment ] [CHINA-20190404R] using [1] data paths, mounts [[(F:)]], net usable_space [55.9gb], net total_space [310.4gb], types [NTFS] [2021-04-29T14:46:21,521][INFO ][o.e.e.NodeEnvironment ] [CHINA-20190404R] heap size [4.9gb], compressed ordinary object pointers [true] [2021-04-29T14:46:21,714][INFO ][o.e.n.Node ] [CHINA-20190404R] node name [CHINA-20190404R], node ID [sNMu5xgcRuOKoZrONO2Gfw], cluster name [elasticsearch] [2021-04-29T14:46:27,876][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [CHINA-20190404R] [controller/19736] [Main.cc@114] controller (64 bit): Version 7.9.1 (Build 6ed2566ba11bb5) Copyright (c) 2020 Elasticsearch BV [2021-04-29T14:46:28,402][INFO ][o.e.x.s.a.s.FileRolesStore] [CHINA-20190404R] parsed [0] roles from file [F:\pythonbishe\searchspider\elasticsearch-7.9.1\elasticsearch-7.9.1\config\roles.yml] [2021-04-29T14:46:29,556][INFO ][o.e.d.DiscoveryModule ] [CHINA-20190404R] using discovery type [zen] and seed hosts providers [settings] [2021-04-29T14:46:30,034][WARN ][o.e.g.DanglingIndicesState] [CHINA-20190404R] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually [2021-04-29T14:46:30,455][INFO ][o.e.n.Node ] [CHINA-20190404R] initialized [2021-04-29T14:46:30,456][INFO ][o.e.n.Node ] [CHINA-20190404R] starting ...

[2021-04-29T14:46:36,740][WARN ][o.e.b.BootstrapChecks ] [CHINA-20190404R] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured [2021-04-29T14:46:36,742][INFO ][o.e.c.c.Coordinator ] [CHINA-20190404R] cluster UUID [sii9t7F3SbuZYXcAEgtzLw] [2021-04-29T14:46:36,755][INFO ][o.e.c.c.ClusterBootstrapService] [CHINA-20190404R] no discovery configuration found, will perform best-effort cluster bootstrapping after [3s] unless existing master is discovered [2021-04-29T14:46:36,946][INFO ][o.e.c.s.MasterService ] [CHINA-20190404R] elected-as-master ([1] nodes joined)[{CHINA-20190404R}{sNMu5xgcRuOKoZrONO2Gfw}{nheUEoN7RBK9Ip9wuIV8Uw}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=12764131328, xpack.installed=true, transform.node=true, ml.max_open_jobs=20} elect leader, _BECOME_MASTERTASK, _FINISHELECTION], term: 11, version: 173, delta: master node changed {previous [], current [{CHINA-20190404R}{sNMu5xgcRuOKoZrONO2Gfw}{nheUEoN7RBK9Ip9wuIV8Uw}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=12764131328, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]} [2021-04-29T14:46:37,104][INFO ][o.e.c.s.ClusterApplierService] [CHINA-20190404R] master node changed {previous [], current [{CHINA-20190404R}{sNMu5xgcRuOKoZrONO2Gfw}{nheUEoN7RBK9Ip9wuIV8Uw}{127.0.0.1}{127.0.0.1:9300}{dilmrt}{ml.machine_memory=12764131328, xpack.installed=true, transform.node=true, ml.max_open_jobs=20}]}, term: 11, version: 173, reason: Publication{term=11, version=173} [2021-04-29T14:46:37,479][INFO ][o.e.l.LicenseService ] [CHINA-20190404R] license [f2ee4830-1479-499d-b840-c02fa96ec0ce] mode [basic] - valid [2021-04-29T14:46:37,481][INFO ][o.e.x.s.s.SecurityStatusChangeListener] [CHINA-20190404R] Active license is now [BASIC]; Security is disabled [2021-04-29T14:46:37,494][INFO ][o.e.g.GatewayService ] [CHINA-20190404R] recovered [7] indices into cluster_state [2021-04-29T14:46:37,793][INFO ][o.w.a.d.Dictionary ] [CHINA-20190404R] try load config from F:\pythonbishe\searchspider\elasticsearch-7.9.1\elasticsearch-7.9.1\config\analysis-ik\IKAnalyzer.cfg.xml [2021-04-29T14:46:37,797][INFO ][o.w.a.d.Dictionary ] [CHINA-20190404R] try load config from F:\pythonbishe\searchspider\elasticsearch-7.9.1\elasticsearch-7.9.1\plugins\elasticsearch-analysis-ik-7.9.1\config\IKAnalyzer.cfg.xml

[2021-04-29T14:46:40,161][INFO ][o.e.n.Node ] [CHINA-20190404R] started [2021-04-29T14:46:40,983][INFO ][o.e.c.r.a.AllocationService] [CHINA-20190404R] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.kibana_1][0], [zhihu_question][0]]]).

elasticsearch 7.9.1 启动正常 ;;;;;;;;;;;;

Microsoft Windows [版本 10.0.17763.832] (c) 2018 Microsoft Corporation。保留所有权利。

F:\pythonbishe\searchspider\mtianyanSearch-master>python manage.py runserver --settings=FunPySearch.settings.local Watching for file changes with StatReloader Performing system checks...

System check identified no issues (0 silenced). April 29, 2021 - 14:46:59 Django version 3.1.1, using settings 'FunPySearch.settings.local' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.

mtianyanSearch本地部署启动正常 数据库连接正常 注册和登录功能正常实现 ;;;;;;;;;;;;;;; 但是输入关键字点击搜索无反应 image 查看命令显示 Internal Server Error: /suggest/ Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\exception.py", line 47, in inner response = get_response(request) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\handlers\base.py", line 179, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\views\generic\base.py", line 70, in view return self.dispatch(request, *args, *kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\django\views\generic\base.py", line 98, in dispatch return handler(request, args, kwargs) File "F:\pythonbishe\searchspider\mtianyanSearch-master\search\views.py", line 99, in get suggestions_question = s_question.execute() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch_dsl\search.py", line 698, in execute *self._params File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\client\utils.py", line 152, in _wrapped return func(args, params=params, headers=headers, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\client__init__.py", line 1617, in search body=body, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\transport.py", line 392, in perform_request raise e File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\transport.py", line 365, in perform_request timeout=timeout, File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\connection\http_urllib3.py", line 269, in perform_request self._raise_error(response.status, raw_data) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\elasticsearch\connection\base.py", line 301, in _raise_error status_code, error_message, additional_info elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'no mapping found for field [suggest]') [29/Apr/2021 14:48:54] "GET /suggest/?s=%E6%AD%A6%E6%B1%89%20%20&stype=question&=1619678934177 HTTP/1.1" 500 117681 小白还是不清楚什么原因 望大佬解答