知识点

相关文章

更多

最近更新

更多

solr 管理后台使用

2019-03-05 20:04|来源: 网路

solr项目可以有多个核心(core,在solr自带的示例里有一个 collection1的core,放在 E:\dev\solr\solr-4.10.4\example\solr\collection1 ),可以在核心下面定义索引结构和存放索引

核心中必须要有两个配置文件
   一个是 schema.xml,用来定义索引结构;
   一个是 solrconfig.xml,用来配置缓、扩展插件等

选择collection1




分词
Field Value (Index)和Field Value (Query)输出你要分词的内容,然后在Analyse Fieldname / FieldType选择预告定义的索引字段,点击 Analyse Values即可显示分词结果


创建索引

提交文档创建索引,可以提交json,xml,csv等格式的文档,返回 Status: success 表示提交成功


查询文档
在q中,可以通过key:value的形式添加查询条件等



相关问答

更多
  • 简单的说使用solrJ. 也就是通关java代码的方式增加索引 然后再调用一系列方法查出索引。 给你个我学习时的链接http://blog.sina.com.cn/s/blog_64ac3ab10100t3mq.html 友情提示:这种问题去论坛问比较好。csdn iteye 等等
  • 试试像这样: nohup yourcommand > output.log 2>&1 & nohup将防止您在注销事件中终止您的命令。 &将在后台运行它。 > output.log将把stdout发送到output.log 2>&1会将stderr重定向到stdout Try something like: nohup yourcommand > output.log 2>&1 & nohup will prevent yourcommand from being terminated in the e ...
  • 不幸的是,在撰写本文时这是一个悬而未决的问题 ,实施它似乎并没有太大的兴趣。 正如评论中所建议的,您可以通过设置一些外部连接(如WebDAV,FTP,SFTP,SCP)来解决此问题。 Unfortunately that's an open issue as of this writing, and there doesn't seem to be much interest to implement it. As suggested in the comments you can work around ...
  • 您需要将字段复制到默认搜索字段(在本例中为文本),或者使用要搜索的字段限定查询: .../select?q=city:Nashua&wt=xml&indent=true 要阅读的内容: 默认搜索字段 复制字段 两者都记录在这里: https://wiki.apache.org/solr/SchemaXml You need to either copy your fields into the default search field (in this case text) or qualify your ...
  • 看看IBM 。 也许这会让你走上正确的道路。 结果数量:指定要返回的最大结果数量。 开始:在结果集中开始的偏移量。 这对分页很有用。 所以你可能想要一些变化 10 0 你的solr客户端应该提供一些方法来获得结果的总数,而不会有太多麻烦。 Take a look at IBM. Maybe that will get you on the right course. Number of results: Spec ...
  • 您正在使用错误的API。 UpdateRequest用于对索引数据执行操作(添加/删除文档等),而不用于管理集合的设置方式,例如创建分片,您需要使用此 You are using the wrong api. The UpdateRequest is for performing actions on the index data (adding/deleting docs etc), not for managing how the collection is set up, for creating a ...
  • 我发现的最好方法是在项目结构的顶层创建一个solr-conf目录,其中包含您的所有Solr配置: - project - solr-conf solr.xml - collection1 - conf 然后使用solr-conf目录以SOLR_HOME运行Solr。 您需要将Solr dataDir属性设置为目录树之外的属性,或者将collection1 / data添加到svn:ignore列表中。 要更改数据目录,您应该能够将-Dsolr.data.dir=/data/path到Solr命令行(使用的实 ...
  • 在SolrCloud模式下,您应该使用内置的身份验证和授权支持 。 您可以通过将security.json文件上传到Zookeeper集合来启用它: { "authentication":{ "blockUnknown": true, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1 ...