我正在使用tika和ctakes来注释带有日期信息的solr文档。我将结果作为json得到,并将其存储在名为ctakes
的新字段中,现在我想从我的结果json中提取日期。
有没有办法只需在solr查询参数中插入json路径就可以轻松实现?我希望ctakes:DateAnnotation作为一个单独的字段,所以我可以将其作为日期处理
http://localhost:8983/solr/collection2/select?q=ctakes:*DateAnnotation*&wt=json&fl=ctakes
示例查询。
ctakes[0]["ctakes:DateAnnotation"]
["10/12:918:923:", "10/12:960:965:", "10/12:997:1002:", "10/12:1038:1043:"]
示例json:
ctakes: [
"[{"Content-Encoding":"UTF-8","Content-Length":"10061","Content-Type":"application/xhtml+xml; charset\u003dUTF-8","Content-Type-Hint":"text/html; charset\u003dutf-8","X-Parsed-By":["org.apache.tika.parser.CompositeParser","org.apache.tika.parser.ctakes.CTAKESParser","org.apache.tika.parser.html.HtmlParser"],"X-TIKA:parse_time_millis":"47811","ctakes:DateAnnotation":["10/12:918:923:","10/12:960:965:","10/12:997:1002:","10/12:1038:1043:"]}]"
]