CouchDB全文搜索 [英] CouchDB Full Text Search

查看:199
本文介绍了CouchDB全文搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些关于在couchdb中进行全文搜索的指导。它是否已经在2.0中默认启用,或者我们是否需要重建couchdb来启用它?

场景:
这是一个文档管理系统,显示文档在网格中。我需要能够对结果进行排序。在从map减少到弹性索引之后,现在我试图使用芒果查询。

  {
selector:{
directoryName:{
$ eq:mail\\test\\inbox
}},
sort:[{subject:asc尝试按主题或其他文本字段排序,混合结果与,我想,索引逻辑(例如:返回的排序主题:这封电子邮件...,你好...,这封电子邮件......,肯定不是我需要的)。不要记得分析器,令牌等与怪异搜索结果有关。例如,使用日期字段desc排序,它可以更好地工作,但是我有2014年文档的入侵者结果,显示文档从2017年到desc,有2016年和2015年文档。



我为几个可能的文档排序字段创建了json类型的索引。创建文本类型索引不起作用。我不知道它全文搜索将解决我的排序问题,但所有的引用云查询语言和全文搜索,我认为这个功能包含在2.0中。



最常用的两个选项是: couchdb-lucene elasticseach


i need some direction about full text search in couchdb. Is it already enabled by default in 2.0, or do we have to rebuild couchdb enabling it?

Scenario: It is a document management system, documents are shown in a grid. I need to be able to sort results. After several changes from map reduces to elastic indexes, now i am trying to use mango queries. Problem is that sorting does not give the expected results.

{
  "selector": {
    "directoryName": {
      "$eq": "mail\\test\\inbox"
    }},
    "sort": [{"subject": "asc"}]
}

Trying to sort by "subject" or other text field, mixes results with, i suppose, "index logic" (e.g.: returned sorted subjects: "This email...", "Hello...", "This email...", definetly not what i need). Dont remember if analyzers, tokens, etc, have something to do with "weird" search results. With date fields desc sort, for example, it works much better, but i have an "intruder" result of a document of year 2014 when showing documents from 2017 to desc, having 2016 and 2015 documents.

I have created indexes of type json for a few of the possible document sorting fields. Creating a text type index does not work. I do not know it full text search will solve my "sorting" problems, but with all the references to cloudant query language and full text search, i thought that this feature was included in 2.0.

解决方案

CouchDB itself doesn't have a full-text indexer built in. You can do a lot with mango, but you'll probably be much better served by a dedicated full-text indexer.

The 2 most common options are: couchdb-lucene and elasticseach

这篇关于CouchDB全文搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆