Changes for page Solr Search Query API
Last modified by Admin on 2024/03/25 16:54
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. Admin1 +xwiki:XWiki.mflorea
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -7,6 +7,9 @@ 7 7 #set ($discard = $query.bindValue('sort', "score desc")) 8 8 #set ($discard = $query.bindValue('fq', '{!q.op=AND} type:DOCUMENT locales:(en OR fr) hidden:false')) 9 9 #set ($searchResponse = $query.execute()[0]) 10 +#foreach ($searchResult in $searchResponse.results) 11 + #displaySearchResult($searchResult) 12 +#end 10 10 {{/code}} 11 11 12 12 In the example above ##$searchResponse## is an instance of [[QueryResponse>>http://lucene.apache.org/solr/4_0_0/solr-solrj/org/apache/solr/client/solrj/response/QueryResponse.html]]. You should read the [[Solr schema design>>design:Design.SolrSchema]] to understand what you can search for using this API.