Solr的默认查询解析器是什么 [英] what is solr's default query parser

查看:87
本文介绍了Solr的默认查询解析器是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对solr文档中的这些词感到困惑:

i am confused by these words in the solr document:

https://cwiki.apache.org/confluence/display/solr/The + Standard + Query + Parser

在Solr 1.3之前,标准请求处理程序将标准称为 查询解析器作为默认查询解析器.从Solr 1.3开始的版本中, 标准请求处理程序将DisMax查询解析器作为 默认查询解析器.

Before Solr 1.3, the Standard Request Handler called the standard query parser as the default query parser. In versions since Solr 1.3, the Standard Request Handler calls the DisMax query parser as the default query parser.

https://cwiki.apache.org/confluence/display/solr/The + DisMax + Query + Parser

q参数不支持通配符,例如*.

The q parameter does not support wildcard characters such as *.

所以我下载solr 4.7.2,将其解压缩

so i download solr 4.7.2, unzip it

检查我是否拥有

  <requestHandler name="/select" class="solr.SearchHandler">

默认为中的

.

in solr-4.7.2/example/solr/collection1/conf/solrconfig.xml, by default.

然后,我将此文档编入索引

then, i index this document

<?xml version="1.0"?>
<add>
  <doc boost="1.0">
        <field name="id">item1</field>
    </doc>
</add>

但是

http://localhost:8983/solr/collection1/select?q=id:it*

找到文档,

http://localhost:8983/solr/collection1/select?q=id:it*defType=dismax

没有找到项目

看起来标准查询解析器是默认查询器,而不是dismax查询解析器?

so looks like standard query parser is the default instead of the dismax query parser?

推荐答案

缺省值在您的solrconfig.xml文件中定义. 4.7.2随附的默认solrconfig.xml文件具有以下条目:

The default is defined in your solrconfig.xml file. The default solrconfig.xml file that comes with 4.7.2 has the following entry:

edismax

这意味着默认值为扩展的dismax查询解析器. http://wiki.apache.org/solr/ExtendedDisMax

This means that the default is the extended dismax query parser. http://wiki.apache.org/solr/ExtendedDisMax

这篇关于Solr的默认查询解析器是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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