`
topcat
  • 浏览: 282493 次
  • 性别: Icon_minigender_1
  • 来自: 湖北武汉
社区版块
存档分类
最新评论

Solr查询中神奇的field

阅读更多

今天看到公司同事的代码,其中有一个solr的查询url,大概是这样的

 

select/?qt=tapSearch&q=NOT+statusDescription:(Draft+OR+Pending)+AND+_query_:"{!dismax+qf=$qqf+v=$qq}"&qqf=title^2+summary^1+description^.5+alias^.5&qq=java

 

我一看_query_:"{!dismax+qf=$qqf+v=$qq}"&qqf=title^2+summary^1+description^.5+alias^.5&qq=java这一段是做什么的,到schema里去找没有_query_这个field,这尼玛是哪里来的?皱眉

到solr的wiki上也没找到这个写法是什么意思,用goolge查到

http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200802.mbox/<c68e39170802251205u65b6b965nac1ac13def8089ae@mail.gmail.com>

从这个邮件中可以看到这个字段还真是个奇葩呀,看看例子:

_query_:"+foo +bar" is equivalent to +foo +bar.

  So a way to embed a dismax query in a standard lucene query is:
_query_:"<!dismax>kittens"
   Another way to write that is
_query_:"<!dismax v=kittens>"
   And yet another way (moving the query to a separate q1 parameter) is
_query_:"<!dismax v=$q1>" & q1=kittens
   We can specify or override other dismax params in the local params:
_query_:"<!dismax mm=100% qf='raw^r name^1' v=$q1>" & q1=kittens
0
0
分享到:
评论

相关推荐

    支持solr 5.3.0的IKAnalyzer中文分词器

    IKAnalyzer中文分词器本身已经不支持最新的solr 5,集成到solr中分词会报错,这里将解决了solr 5支持问题的最新IK包共享出来,希望能帮到各位! 附上IK在schema.xml中的配置: &lt;fieldType name="text_ik" class=...

    solr基础知识介绍

    3.3.4 Field 6 3.3.5 IndexWriter 6 3.3.6 IndexSearcher 6 3.3.7 Directory 6 3.3.8 Segment 7 3.3.9 QueryParser 7 3.3.10 Hits 7 4.应用示例 7 4.1 创建索引 7 4.1 删除索引 7 4.1 索引查询 8 5.配置文件分析 9 ...

    Solr in action.mobi

    PART 1 MEET SOLR. .................................................................1 1 ■ Introduction to Solr 3 ...11 ■ Result grouping/field collapsing 330 12 ■ Taking Solr to production 356

    solr 企业搜索引擎教程

    某些情况下可能需要进行编码,Solr 可以阅读和使用构建到其他 Lucene 应用程序中的索引。此 外,很多 Lucene 工具(如 Nutch、 Luke)也可以使用 Solr 创建的索引 Solr 的特性包括:  高级的全文搜索功能  专为高通量...

    solr相关的jar包

    这是用Java对solr进行调用需要用到的一些jar包

    SolrQueryComponent:轻松构建Solr查询

    SolrQueryComponent使用查询构建器API帮助构建Solr / Lucene / ElasticSearch查询。 它独立于具体的客户端库,并且可以与或。 例子 内部版本name:"John Doe"^100 &lt;?php use InterNations \ Component \ Solr \ ...

    solr5.x(含5.4)可用的ikanalyzer中文分词

    solr5.x(含5.4)可用的ikanalyzer中文分词 &lt;fieldType name="text_ik" class="solr.TextField"&gt; &lt;/fieldType&gt;

    ik-analyzer-solr7.zip

    1.ik中文分词器适配最新版本solr... &lt;fieldType name="text_ik" class="solr.TextField"&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;filter class="solr.LowerCaseFilterFactory"/&gt; &lt;/fieldType&gt;

    Solr in Action最新完整版

    Readers will gain a deep understanding of how to implement core Solr capabilities such as faceted navigation through search results, matched snippet highlighting, field collapsing and search results ...

    基于java-solr-geo空间坐标搜索、距离排序、分页

    基于solr-geo空间搜索 1、Solr的schema.xml配置 定义坐标field 2、Solr的data-config.xml配置 建立索引 3、java查询语法 坐标距离、分页、排序

    Solr in Action 英文版完整版

    Readers will gain a deep understanding of how to implement core Solr capabilities such as faceted navigation through search results, matched snippet highlighting, field collapsing and search results ...

    Solr的基本使用

    schema.xml,在SolrCore的conf目录下,它是Solr数据表配置文件,它定义了加入索引的数据的数据类型的。主要包括FieldTypes、Fields和其他的一些缺省设置。...通过使用solr查询要看出返回给客户端是数组:Field

    ik-analyzer-solr5 jar包

    对于solr5.x系列中文分词器在solr中配置如下 &lt;fieldType name="text_ik" class="solr.TextField"&gt; &lt;analyzer type="index" useSmart="false" class="org.wltea.analyzer.lucene.IKAnalyzer"/&gt; ...

    IKAnalyzer-solr4.x-update.zip

    通过继承Analyzer编写自定义类UseSmartIKAnalyzer和NotUseSmartIKAnalyzer,实现智能... &lt;fieldType name="text_ik" class="solr.TextField"&gt; &lt;!-- 使用智能分词 --&gt; &lt;!-- 使用智能分词 --&gt; &lt;/fieldType&gt;

    Solr 3.5开发应用教程.pdf

    Apache Solr 是一个开源的搜索服务器,Solr 使用 Java 语言开发,主要基于 HTTP 和 Apache ...定制 Solr 索引的实现方法很简单,用 POST 方法向 Solr 服务器发送一个描述所有 Field 及其内容的 XML 文档就可以了。

    Apache.Solr.4.Enterprise.Search.Server.3rd.Edition.1782161368.epub

    If you are a developer who wants to learn how to get the most out of Solr in your applications, whether you are new to the field of search or have used Solr but don t know everything or simply want a ...

    Solr in Action(1.2.3.4.5.6.8.11章可用)

    Solr in Action version 6 PART 1:MEET SOLR 1 Introduction to Solr – FREE 2 Getting to know Solr – AVAILABLE 3 Key Solr concepts – AVAILABLE 4 Configuring Solr – AVAILABLE 5 Indexing – AVAILABLE 6...

    Solr in Action

    through search results, matched snippet highlighting, field collapsing and search results grouping, spell-checking, query autocomplete, querying by functions, and more. You’ll also see how to take ...

    Apache.Solr.4.Enterprise.Search.Server.3rd.Edition.1782161

    If you are a developer who wants to learn how to get the most out of Solr in your applications, whether you are new to the field of search or have used Solr but don t know everything or simply want a ...

    支持Spring-data-solr1.5的ik分词器,同义词

    &lt;fieldType name="text_lk" class="solr.TextField"&gt; &lt;analyzer type="index"&gt; &lt;tokenizer class="org.wltea.analyzer.lucene.IKTokenizerFactory" useSmart="false"/&gt; &lt;filter class="solr....

Global site tag (gtag.js) - Google Analytics