以下是我的schema.xml
<field name="preset_id" indexed="true" type="long"/>
<field name="ep_user_id" indexed=" true" type="long" required="false"/>
<field name="preset_name" indexed="true" type="string"/>
<field name="origin" indexed="true" type="string"/>
<uniqueKey>preset_id</uniqueKey>
<defaultSearchField>preset_name</defaultSearchField>
我正在使用标准搜索处理程序
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<!--
<int name="rows">10</int>
<str name="fl">*</str>
<str name="version">2.1</str>
-->
</lst>
</requestHandler>
查询选择/?q = * at * + AND + origin%3ASingapore&amp; rows = 100 我的回复是
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">330</int>
<lst name="params">
<str name="version">2.2</str>
<str name="rows">10</str>
<str name="q">*at* AND origin:Singapore</str>
<str name="start">0</str>
<str name="indent">on</str>
</lst>
</lst>
<result name="response" numFound="19" start="0">
<doc>
<str name="ep_user_id">114048</str>
<str name="origin">Singapore</str>
<long name="preset_id">1666</long>
<str name="preset_name">Watch</str>
</doc>
<doc>
<str name="ep_user_id">114053</str>
<str name="origin">Singapore</str>
<long name="preset_id">1752</long>
<str name="preset_name">Watch</str>
</doc>
....
但是,如果我使用查询字符串查询 / select /?q = * at * + AND + ep_user_id%3A14048&amp;&amp; rows = 100
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">156</int>
<lst name="params">
<str name="version">2.2</str>
<str name="rows">10</str>
<str name="q">*at* AND ep_user_id:14048</str>
<str name="start">0</str>
<str name="indent">on</str>
</lst>
</lst>
<result name="response" numFound="0" start="0"/>
</response>
我无法根据ep_user_id过滤结果,但是我的原点是成功的。需要帮助来解决这个问题。提前谢谢..
答案 0 :(得分:1)
可能会检查架构indexed=" true"