Search 无法在schema.xml中定义的字段(如copyField)中搜索
我已通过以下方式将多值字段添加到schema.xml中:Search 无法在schema.xml中定义的字段(如copyField)中搜索,search,solr,solr-schema,Search,Solr,Solr Schema,我已通过以下方式将多值字段添加到schema.xml中: <field name="text_qs" type="text" indexed="true" stored="false" multiValued="true"/> 它只包含以下字段: <copyField source="name" dest="text_def"/> <copyField source="symbol" dest="text_def"/> <copyField sourc
<field name="text_qs" type="text" indexed="true" stored="false" multiValued="true"/>
它只包含以下字段:
<copyField source="name" dest="text_def"/>
<copyField source="symbol" dest="text_def"/>
<copyField source="numb" dest="text_def"/>
....
....
因此,现在当我们键入'ge'
时,我们在默认搜索字段text_def中搜索此'ge'
,并在字段'name','symbol','numb',…
但是我们只想在'name'
和'symbol'
中搜索。这就是为什么我尝试创建字段text\u qs
这是否正确?尝试将更改存储为true
<field name="text_qs" type="text" indexed="true" stored="true" multiValued="true"/>
如果在搜索过程中该字段的值应该是可检索的,则为True。很抱歉造成混淆。
事实证明,问题在于索引。执行索引的脚本在这种情况下没有用处,我不得不使用另一个脚本。
谢谢你的帮助 请勾选此否,不幸的是,
stored=“true”
对我没有帮助。至于这个链接:我的问题恰恰相反。不,我可以像q=ge
那样搜索,但它在默认搜索字段中搜索。我想创建我的多值字段text\u qs
并在该字段中搜索q=text\u qs:ge
<copyField source="name" dest="text_def"/>
<copyField source="symbol" dest="text_def"/>
<copyField source="numb" dest="text_def"/>
....
<field name="text_qs" type="text" indexed="true" stored="true" multiValued="true"/>