Function SOLR会丢失CONCAT函数查询字段中的一些单词-如何让它处理所有单词?

Function SOLR会丢失CONCAT函数查询字段中的一些单词-如何让它处理所有单词?,function,solr,concat,Function,Solr,Concat,我有一份SOLR文件: { "id": "Test1", "MyInt": 100500, "FirstString": ["Test First String"], "SecondString": ["Test Second String"] } 此核心的托管架构是: ... <field name="MyInt" type="plong" /> <field name="FirstString" type="text_genera

我有一份SOLR文件:

{
    "id": "Test1",
    "MyInt": 100500,
    "FirstString": ["Test First String"],
    "SecondString": ["Test Second String"]
}
此核心的托管架构是:

...
  <field name="MyInt" type="plong" /> 
  <field name="FirstString" type="text_general" /> 
  <field name="SecondString" type="text_general" /> 
...
希望在结果中看到一些强大的文本信息,如:

Result:"Test First String;Test Second String"
但事实上,SOLR删除了部分单词,每个字段只剩下一个单词。也许最重要的事情是:

Result:"First;Second"
不要让我在/select中将wt=json更改为wt=csv,我知道这个特性,但在这种情况下它不适合

请告知SALS如此奇怪行为的原因是什么

这可能是因为数据存储在type=“text\u general”字段中,且多值=true?我用type=“string”字段做了一个实验——问题重复出现


我不明白如何让SOLR从concat函数查询中的text\u general字段中提取所有单词?

您的假设是因为使用了
text\u general
字段类型是正确的;当您使用
concat
时,仅从字段返回第一个令牌。但是,您的意思是,当使用
字符串
字段时,它也不起作用-这是错误的。当使用
字符串
字段类型时(即不进行任何处理且文本作为单个标记逐字存储),行为与您的请求相同:

{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":4,
    "params":{
      "q":"*:*",
      "fl":"FirstField_string, LastField_string, Result:concat(FirstField_string,';',LastField_string)",
      "_":"1581267948122"}},
  "response":{"numFound":1,"start":0,"docs":[
      {
        "FirstField_string":"Test First String",
        "LastField_string":"Test Second String",
        "Result":"Test First String;Test Second String"}]
  }}

字段名更改只是因为我尝试了您的原始字段名。这要求字段必须是
multiValued=“false”

谢谢,现在我了解了问题所在以及解决方法!
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":4,
    "params":{
      "q":"*:*",
      "fl":"FirstField_string, LastField_string, Result:concat(FirstField_string,';',LastField_string)",
      "_":"1581267948122"}},
  "response":{"numFound":1,"start":0,"docs":[
      {
        "FirstField_string":"Test First String",
        "LastField_string":"Test Second String",
        "Result":"Test First String;Test Second String"}]
  }}