Need searched text and a few lines around it in Solr search in java api
问题 i'm using solr 7.7.2 and I wrote a Java program in Solr using solrj that searches for a word in a huge text file. I use following code to show the search results that represent the whole text. SolrQuery params = new SolrQuery(); params.setQuery("content:word for search"); How to display only one line of text where the word is in that line? All code is like this public static void main(String args[]) throws SolrServerException, IOException { String urlString = "http://localhost:8983/solr/test