简体   繁体   中英

how to search a text in solr using REST Api?

I have a query in Elastic Search shown below

sample code

How can I perform the same using Solr?

您可以按如下所示的查询字符串进行搜索。

http://domain/solr/core_name/select?q=*:*&fq=studentId:14466&wt=json&indent=true

You can do a single match against a field in standard Lucene syntax:

q=field:value

Having field names with characters outside of [a-zA-Z0-9] isn't recommended, but you could probably escape it properly with student\\ I\\'d:14466 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM