lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SOLR-11290) replace expression doesn't allow strings
Date Thu, 24 Aug 2017 18:42:00 GMT
Andrew C. Oliver created SOLR-11290:
---------------------------------------

             Summary: replace expression doesn't allow strings
                 Key: SOLR-11290
                 URL: https://issues.apache.org/jira/browse/SOLR-11290
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: streaming expressions
    Affects Versions: 6.6
            Reporter: Andrew C. Oliver


with the enron mail set:

select(
  search(enron, fl="Mail_From_s, Mail_To_s, Content_Length_i, subject_s", q="*:*", sort="Mail_From_s
asc"),
  Mail_From_s as from,
  Mail_To_s as to,
  Content_Length_i as length,
  subject_s as subject,
  replace(subject," ",withValue="shredded")
)

doesn't work. And even replacing the " " with a very specific subject that is returned fails.
 However 

select(
  search(enron, fl="Mail_From_s, Mail_To_s, Content_Length_i, subject_s", q="*:*", sort="Mail_From_s
asc"),
  Mail_From_s as from,
  Mail_To_s as to,
  Content_Length_i as length,
  subject_s as subject,
  replace(length,1118,withValue=0)
)

Does actually work (on the numeric field)

This leads to the conclusion (though not documented) that replace doesn't support text/string
fields or values. IT should...or at least the documentation should mention it doesn't. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message