8000 Solr6.6 创建core · Issue #7 · x113773/testall · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Solr6.6 创建core #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
x113773 opened this issue Jun 20, 2017 · 11 comments
Open

Solr6.6 创建core #7

x113773 opened this issue Jun 20, 2017 · 11 comments
Labels

Comments

@x113773
Copy link
Owner
x113773 commented Jun 20, 2017
  1. 首先在solr-6.6.0目录运行命令,启动solr:
    Linux: $ bin/solr start
    Windows: bin\solr.cmd start

  2. 创建core:
    Linux: $ bin/solr create -c mycore1
    Windows: bin\solr.cmd create -c mycore1

solr-6.6.0\server\solr目录下生成的mycore1就是创建好的core

@x113773
Copy link
Owner Author
x113773 commented Jun 20, 2017

部署到Tomcat上启动:
qq 20170620162423

@x113773
Copy link
Owner Author
x113773 commented Jun 20, 2017

内置jetty启动:
qq 20170620162407

@x113773 x113773 added the doc label Jun 29, 2017
@cy503328434
Copy link

[root@localhost solr-6.6.0]# bin/solr start
WARNING: Starting Solr as the root user is a security risk and not considered be st practice. Exiting.
Please consult the Reference Guide. To override this check, start with argument '-force'
[root@localhost solr-6.6.0]# bin/solr start
WARNING: Starting Solr as the root user is a security risk and not considered be st practice. Exiting.
Please consult the Reference Guide. To override this check, start with argument '-force'
[root@localhost solr-6.6.0]# bin/solr create -c mycore1
Failed to determine the port of a local Solr instance, cannot create mycore1!
[root@localhost solr-6.6.0]# ll\

按你的做,创建不了

@x113773
Copy link
Owner Author
x113773 commented Jul 3, 2017

@cy503328434 你看提示“Starting Solr as the root user is a security risk...”,你是用root用户启动的吧,如果是root用户需要在后面加上 -force 参数。还是建议你使用普通用户,避免出现类似问题。(如果提示普通用户没有权限,需要使用chmod或chown命令加上权限)

@cy503328434
Copy link

这个创建的core到底有什么用呀,我看其他的教程里面,好像没有创建它。

@x113773
Copy link
Owner Author
x113773 commented Jul 3, 2017

额,solr的索引数据和一些配置都在一个core里,所以使用solr至少需要有一个core。其他教程大部分是拷贝一个solr提供的core的例子改下名字,我这是创建一个新的。

@13462289912
Copy link

6.6的solr怎么配置中文分词啊

@x113773
Copy link
Owner Author
x113773 commented Jul 14, 2017

@13462289912

配置managed-schema:

<!-- add begin-->
   <field name="keyWord" type="text_zh" indexed="true" stored="false" multiValued="true"/>
   <field name="text" type="text_zh" indexed="true" stored="false" multiValued="true"/>
   <!-- add end-->

<!-- mmseg4j -->
   <fieldType name="text_zh" class="solr.TextField" positionIncrementGap="100">
		<span style="white-space:pre"> </span><analyzer>
		<span style="white-space:pre"> </span><tokenizer class="com.chenlb.mmseg4j.solr.MMSegTokenizerFactory" mode="complex" />
		<span style="white-space:pre"> </span></analyzer>
   </fieldType>

可以搜一下这个 mmseg4j

@13462289912
Copy link

mmseg4j的jar包 1.9.1里面的3个jar包都需要导入到lib下吗?

@x113773
Copy link
Owner Author
x113773 commented Jul 14, 2017

image
我们之前用了这两个(我不确认哈,我们之前有个项目是用到solr了,但是分词这个不是我弄的,网上都说3个都加,你就都加上应该没问题)
@13462289912

@13462289912
Copy link

嗯嗯 谢谢了

@x113773 x113773 added doc and removed doc labels Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0